Рет қаралды 1,971
Part 3
Exercise on Session V
1. write code for line graph of x values Vs y values as follows:
x values vary from 0 to 20
y is function of x as sin(x)
2. write MATLab code to multi-plot following functions.
x range from 0 to pi
y1 is cos function of x
y2 is sin function of x
3. write MATLab code to plot pi chart for following values
x= (1 5 2.7 3 7 4.8)
for exploding the are 2 and 5
use colormap HSV
4. write MATLab code to plot following x values Vs y values with custom graph
x :- -2pi to 2pi with increment of pi/6
y is function of x i.e. tan(x)
plot graph for line colour “blue” and marker type “dimond”with line type “dash-dot”.
5. write MATLab code to plot different types of graph using subplot command.
x=0:0.1:pi
y1=sin(x)
y2=cos(x)
y3=x3
y4=e-x