Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

this is function driving me crizy pls help doing this like new student not like

ID: 3537589 • Letter: T

Question

this is function driving me crizy pls help doing this like new student not like pro

Based on what we have done in the last lecture, create two matrices [xx, yy] using x values with range (0 to 2pi, with an interval 0.05pi) and y values with the range (0 to 1, with an interval 0.05).
Define the following variables as follows:
1. c=[0.1 + 0.9*(pi-abs(xx - pi))/pi ] .* yy
2. aa = c .* cos(xx)
3. bb = c.* sin(xx)
4. zz = (-2)*aa.^3 + (3/2)*c.^2 + 0.5
Plot zz against aa and bb using the surf() function.

Explanation / Answer


xx=[0:0.05*pi:pi];

yy=[0:0.05:1];

c=[0.1 + 0.9*(pi-abs(xx - pi))/pi ]* yy'

aa = c * cos(xx);

bb = c * sin(xx);


for i=1:21

aa(i) = aa(i)*aa(i)*aa(i);

end

zz = (-2)*aa + (3/2)*c*c + 0.5;

I am sure about part 1,2,3.

4th I think this should be it.


surf(zz,aa)


surf(zz, bb)