Thursday, September 18, 2014

Matlab marker size color


plot(xini(1),xini(2),'ko','MarkerSize',10, 'MarkerFaceColor',[0,0,0])
plot(tgt(1),tgt(2),'rd','MarkerSize',10, 'MarkerFaceColor',[1,0,0])


Tuesday, September 16, 2014

Skip items in Matlab legend


You can specify a vector of plot handles to use in the legend. For example:

h1 = plot(rand(1,10));      % Blue line
hold on;
h2 = plot(rand(1,10),'r');  % Red line
h3 = plot(rand(1,10),'g');  % Green line
legend([h1 h3],{'hello','world'});  % Only the blue and green lines appear
                                    %   in the legend