0% found this document useful (0 votes)
54 views

Assignment OF MATLAB PDF

This document contains 3 questions for a MATLAB assignment. Question 1 asks to write code to plot an equation from 0 to pi with increments of 0.05 and include a figure caption. Question 2 provides MATLAB code to plot sin(x), cos(x), exp(-x), and x^2 using subplots and asks to add comments. Question 3 asks to plot 2 equations using subplots from Question 2 and label the axes with comments.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Assignment OF MATLAB PDF

This document contains 3 questions for a MATLAB assignment. Question 1 asks to write code to plot an equation from 0 to pi with increments of 0.05 and include a figure caption. Question 2 provides MATLAB code to plot sin(x), cos(x), exp(-x), and x^2 using subplots and asks to add comments. Question 3 asks to plot 2 equations using subplots from Question 2 and label the axes with comments.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MATLAB ASSIGNMENT

Question No 1: Write a Matlab Code that plots an equation from 0 to with an


increment of 0.05. Also show plot with figure caption.
Question No 2: Write following code in Matlab using M-file, write comments for each line
and plot the result with figure caption.

clear all
x=0:0.01:3*pi;
subplot (2,2,1);
plot(x, sin(x));
subplot (2,2,2);
plot(x, cos(x));
subplot (2,2,3)
plot (x, exp (-x));
subplot (2,2,4);
plot (x, x.^2);

Question No 3: Plot following equations on Matlab and use question 2 for subplots. Also
write comments for each line, Label axis and plot. Use Range for both equations are

(1)
(2)

You might also like