Mat Laboratory III 07
Mat Laboratory III 07
1. Create the graph of sin(t) where t = 02*pi and the increment is pi/100. Indications: Try to use sin and plot. t = 0:pi/100:2*pi <lab3_1> 2. Create in the same figure two graphs sin(x) and cos(x), where x = 0:0.1:4*pi. Use different colors and add major grid lines to the current axes. Indication: Try to use sin, cos, plot, set... <lab3_1> 3. Create in the same figure (using the data from the previous exercise) three representations: first with both sin and cos, second with sin and third with cos. Indication: Try to use subplot. <lab3_2> 4. Create in the same figure three graphs: y1 = sin(x) y2 = sin(x-0.25) y3 = sin(x-0.5) where: x = 0:pi/100:2*pi <lab3_4>
5. In the previous exercise try to use different line style specifiers. <lab3_7>
6. Create the graph of the function: y = tan(sin(x)) - sin(tan(x)) where: x = -pi:pi/10:pi. Use markers. Set: 'MarkerEdgeColor','k',... 'MarkerFaceColor','g',... 'MarkerSize',10 <lab3_9>
-1-
7. Modify the script from exercise no. 2 in order to use hold on and hold off. <lab3_10>
8. Modify the previous script in order to indicate with arrows the name of each function. <lab3_11>
9. Create a graph with y-axes on both left and right side for the following function: y = exp(sin(x)) where: x = 0:pi/20:2*pi. Represent the function with plot and stem. <lab3_13>
10. Create a 3-D spiral using sin and cos. Indication: Use plot3. <lab3_16>
11. Create a 3-D graph of the following function: z(x,y) = sin(sqrt(x^2 + y^2) + 0.001) / (sqrt(x^2 + y^2) + 0.001) where x, y [-8, 8] with the increment 0.5. Indication: Use meshgrid and mesh. <lab3_17>
-2-