Scatter Plots in MatLab. I can create a scatter plot with x and y arrays being the same size as follows:
function RasterTest()
clear all % clear memory
clc; % clear command window
close all; % close any figure windows that are open
x=[1 2 3]; % x positions of the charges
y=[4 8 2]; % y positions of the charges
scatter(x,y,'filled')
axis square
end
However, what if I want every x to have multiple y values? I.e. the array sizes are different. I think this is actually called a raster plot but MatLab doesn't seem to have something to do this?
Any help would be great :).
hold onand overlaying graphs which works fine. pccofre answers seems to be correct too. - ale