MATLAB: Using markers for data, lines for simulations

markerMATLAB

I want to plot curves associated with many simulations, hold the figure, then plot the data, but all with markers instead of lines. I can set them all by hand, and then generate the code, but this makes me set each line by hand in my m-file. See my bit of code that is unfinished…
sim = c2pyr(x,time,flip);
H1=plot(time,sim)
set(H1,'LineWidth',2,'LineStyle','--');
hold on
H2=plot(time,data);
set(H2,'LineStyle','none',' (I want to make everything markers)
hold off

Best Answer

hmm, please see if this is of some help to you (though this one does not use function handles!!):
>> a=1:10;b=a.^2;c=a.^3; plot(a,b,'k','LineStyle','--','LineWidth',3),hold on,plot(a,c,'ks','MarkerFaceColor',[1 0 0],'MarkerEdgeColor',[0 1 1]),hold off
Related Question