Create a Matlab program that will generally translate using

Create a Matlab program that will generally translate using a Matlab matrix operation the Spherical components (values) of a vector into Cartesian component of the same vector (numerical values). Find correct matrix in equation set (chl-2). The location irn spherical coordinates for translation will be needed and in each case identified. Once the program is constructed and running you can test it using four test cases. Fill in blanks for predicted components, attach code. (To add confidence to reported results check with geometric reasoning, hand sketch expected). First case, data set one, done for you to clarify what is expected. Use this page as cover, Attach code. staole sheets. and put name on sheets. (Any doubts on interpretation please Z 1)Data set 1 Location, r=1; theta pi/2; phi=pi/2; Spherical components 2Data set 2 Location, Fl; thet-pi/2; phi Spherical components A r 0; A thet=1 ; A phi-0;

Solution

(1)

A_r=1;

A_thet=pi/2;

A_phi=pi/2;

A_x=A_r*sin(A_thet)*cos(A_phi);

A_y=A_r*sin(A_thet)*sin(A_phi);

A_z=A_r*cos(A_thet);

fprintf(\'\ \\t A_x =%0.2f \\t A_y = %0.2f \\t A_z=%0.2f\ \',A_x,A_y,A_z);

OUTPUT:

A_x =0.00    A_y = 1.00    A_z=0.00

(2)

A_r=1;

A_thet=pi/2;
A_phi=pi;

A_x=A_r*sin(A_thet)*cos(A_phi);
A_y=A_r*sin(A_thet)*sin(A_phi);
A_z=A_r*cos(A_thet);
fprintf(\'\ \\t A_x =%0.2f \\t A_y = %0.2f \\t A_z=%0.2f\ \',A_x,A_y,A_z);

OUTPUT:

A_x =-1.00    A_y = 0.00    A_z=0.00

(3)

A_r=1;

A_thet=0;

A_phi=0;

A_x=A_r*sin(A_thet)*cos(A_phi);

A_y=A_r*sin(A_thet)*sin(A_phi);

A_z=A_r*cos(A_thet);

fprintf(\'\ \\t A_x =%0.2f \\t A_y = %0.2f \\t A_z=%0.2f\ \',A_x,A_y,A_z);

OUTPUT:

A_x =0.00    A_y = 0.00    A_z=1.00

(4)

A_r=1;

A_thet=pi/4;

A_phi=pi/4;

A_x=A_r*sin(A_thet)*cos(A_phi);

A_y=A_r*sin(A_thet)*sin(A_phi);

A_z=A_r*cos(A_thet);

fprintf(\'\ \\t A_x =%0.2f \\t A_y = %0.2f \\t A_z=%0.2f\ \',A_x,A_y,A_z);

OUTPUT:

A_x =0.50    A_y = 0.50    A_z=0.71

 Create a Matlab program that will generally translate using a Matlab matrix operation the Spherical components (values) of a vector into Cartesian component of
 Create a Matlab program that will generally translate using a Matlab matrix operation the Spherical components (values) of a vector into Cartesian component of

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site