Am I doing this correctly? I have posted what we are suppose to do and I have po
ID: 3348656 • Letter: A
Question
Am I doing this correctly? I have posted what we are suppose to do and I have posted my matlab code also. I am not to sure i Am doing this correctly. Thanks.
1. All points with coordinates rcos(8) and y-rsin(?), where r is a constant, lie on a circle with radius r, ie. satisfy the equationCreate a row vector for 0 with the values ,T, and 41 , , , y indeed satisfy the Take r-3 and compute the row vectors and a. Now check that and equation of a circle, by computing the radius r-v/22+92 Hint: To calculate r you will need the array operatoror sqaring r and y. Of course, you could also compute 12 by x, *x.Explanation / Answer
The code you have posted is correct but you have defined theta as a column vector instead of row vector. To define row vector provide a space between the elements instead of semicolon (;). The corrected code is shown below.
theta=[0 pi/3 pi/2 2*pi/3 pi 4*pi/3];
r=3;
x=r*cos(theta);
y=r*sin(theta);
r1=sqrt(x.^2+y.^2)
I have defined new variable r1 to compare the result r1 obtained from formula with r. The output r1 is a vector of 3s.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.