Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. A vector can be represented by a 1 by 3 matrix in either rectangular coordinates (x, y, z) or spherical coordinates (r, 0,

 

3. A vector can be represented by a 1 by 3 matrix in either rectangular coordinates (x, y, z) or spherical coordinates (r, 0, 0). The conversions among those two sets of coordinates are given by the following equations: x = r cos o cos 0, y = r cos op sin 0, z = r sin op to convert from spherical to rectangular r = x + y+z2,0 = tan 1 = tanto convert from rectangular to spherical Write a function that accepts two arguments: a 1 by 3 matrix and a number (where a 1 represents converting rectangular to spherical or a 2 that represents converting spherical to rectangular coordinates -note: display an error for any other number other than 1 or 2) then performs the conversion which is the output variable. The values of 0 and op are in degrees and atan) returns radians for the tangent inverse (tan'). This program will require if statements. (16 pts)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Engineering Mechanics Statics

Authors: Russell C. Hibbeler

11 Edition

9780132215091, 132215004, 132215098, 978-0132215008

More Books

Students also viewed these Programming questions

Question

How are writable CDs implemented?

Answered: 1 week ago

Question

83448754-2532623.jpeg i just need answers for questions 1,3,4,5,6,7

Answered: 1 week ago