I have 6 vectors which I want to plot.
How I can make each plot with different color (random)?
With the code below, the plot limited to one color for all six vectors.
plot(x,y,'-rs','LineWidth',1,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',5);
You can have PLOT automatically choose line colors for you. If all 6 of your vectors are the same length, you can put the x and y coordinates into N-by-6 matrices
XandYand pass these to PLOT. A different color will be used for each column:You could also use some of the built-in colormaps to generate a set of colors, then use these when you plot each line separately. For example: