Thursday 8 December 2011

Matlab Mutiplot in Same Plot Window I Matlab Hold on drawnow Example used To Plotting

Some times you want to many plots in same plots window with legend, at that time you have use this type of examples.Here we have used hold on command and also use drawnow used to plot two are more plot in same plot window.That example as follows
>> xdata = rand(10,1);
>> ydata = rand(10,1);
>> figure;
>> plot(xdata);
>> hold on
>> drawnow
>> xdata
>> plot(ydata,'color','red');
>> legend('Xdata','Ydata');

In above code used to mutiplots in same plot window.Here we used two datas xdata and ydata.xdata plot in blue color,Ydata plot in red color.The out put as follows



Kindly Bookmark and Share it:

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...