This video explains plot and subplot command and its various features and properties. It uses MATLAB Live script to showcase the capability of how to do the coding, writing notes, preparing report and visualizing output all together.
Further, it shows how one can create vector variable of different range and step size. This video shows how one can view the output in the live editor itself while doing the programming. Matrix dimension error and Vector length errors are also explained in this video. Towards the end it tells how convenient it is to generate the PDF report out of MATLAB Live editor.
We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com
Source code:
All about Plot and Subplot command in ML Live Script
Simple plot of one variable
x=1:100;
plot(x);
2. Intoroducing Time Variablet=0.1:0.1:10
plot(t,x);
3. Plot Sine Wave
y=sin(t)
plot(y);4. Properties of plot command
hold onplot(x/100);
grid onxlabel(‘Time …’)
ylabel(‘Value …’)plot(y*0.8,’Color’,’r’, ‘LineWidth’,0.2,’LineStyle’,’:’)
5. Subplot
subplot(1,2,1); plot(x);
subplot(1,2,2); plot(y);