0% found this document useful (0 votes)
31 views2 pages

Mat Laboratory III 07

The document provides instructions for 11 MATLAB programming exercises: 1. Plot sin(t) from 0 to 2pi with an increment of pi/100. 2. Plot sin(x) and cos(x) from 0 to 4pi with different colors and grid lines. 3. Plot sin(x) and cos(x) in three subplots. 4. Plot sin(x), sin(x-0.25), and sin(x-0.5) from 0 to 2pi. 5. Use different line styles in the previous plot. 6. Plot tan(sin(x)) - sin(tan(x)) from -pi to pi with markers.

Uploaded by

Squishi Jilbert
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Mat Laboratory III 07

The document provides instructions for 11 MATLAB programming exercises: 1. Plot sin(t) from 0 to 2pi with an increment of pi/100. 2. Plot sin(x) and cos(x) from 0 to 4pi with different colors and grid lines. 3. Plot sin(x) and cos(x) in three subplots. 4. Plot sin(x), sin(x-0.25), and sin(x-0.5) from 0 to 2pi. 5. Use different line styles in the previous plot. 6. Plot tan(sin(x)) - sin(tan(x)) from -pi to pi with markers.

Uploaded by

Squishi Jilbert
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MATLAB PROGRAMMING LABORATORY

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-

You might also like