I am plotting 4 different vectors in same graph. Although MATLAB is assigning them different colours, I want to assign them my own colours. How can I do this? I also want to show the legend. Here is my code:
%Plotting of final solutions
a = 0:h:5.01;
z=1:1:N+2;
%ex=exact
up=upwind(z,M+1);
lf = laxfriedrich(z,M+1);
lw = laxwendroff(z,M+1);
oo = otherone(z,M+1);
plot(a,up,'o',a,lf,'o',a,lw,'o',a,oo,'o');
%plot (a,lf,'o',a,oo,'o');
axis([0,5,-1,1]);