[go: up one dir, main page]

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

Matlab 4

The document contains two questions and answers related to plotting equations and functions in MATLAB. The first question asks to plot the equation 3x^5+2x^4-100x^3+2x^2-7x+90 from -6 to 6 with a spacing of 0.01 and label the axes and title. The second question asks to plot the imaginary part vs real part of the function (0.2+0.8i)^n from 0 to 20 using a green dotted line.

Uploaded by

Pranay Kami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Matlab 4

The document contains two questions and answers related to plotting equations and functions in MATLAB. The first question asks to plot the equation 3x^5+2x^4-100x^3+2x^2-7x+90 from -6 to 6 with a spacing of 0.01 and label the axes and title. The second question asks to plot the imaginary part vs real part of the function (0.2+0.8i)^n from 0 to 20 using a green dotted line.

Uploaded by

Pranay Kami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Questions

Q1. Plot the equation 3x5+2x4-100x3+2x2-7x+90 where -6<x<6 with the spacing of
0.01. Label x & y axis and give the Title.

Ans.
>> x=[-6:1/100:6];
>> y = (3*x.^5)+(2*x.^4)-(100*x.^3)+(2*x.^2)-(7*x)+90;
>> plot(x,y)
>> xlabel('x-axis')
>> ylabel('y-axis')
>> title('Equation')

17
Questions

Q2. Plot the Imaginary part v/s Real Part of the function (0.2+0.8i) n where n=0 to 20.
Use the dotted line of green color to represent the curve.

Ans. >> n=[0:20];


>> y = (0.2+0.8i).^n;
>> plot(real(y),imag(y),'*g')

18

You might also like