Question: Using VBA write a well structured sub procedure to compute (r,theta), given (x,y). It is relatively straightforward to compute Cartesian coordinates (x, y) on the

 Using VBA write a well structured sub procedure to compute (r,theta),

Using VBA write a well structured sub procedure to compute (r,theta), given (x,y).

It is relatively straightforward to compute Cartesian coordinates (x, y) on the basis of polar coordinates (r, ). The reverse process, however, is not so sim- ple. The radius can be computed by the following formula: 11.6 If the coordinates lie in the first or fourth quadrant (that is, if x >0),then the following simple formula can be used to compute : ? = tan-1(- 126 Chapter 11 Structured Programming: Decisions The difficulty arises with the other two quadrants and when x lowing table summarizes the possibilities 0, The fol- anr Write a well-structured Sub procedure to compute (r, ), given (x.y). Express the final results for in degrees. The following is the start of the problem: Sub Polar (x, y, r, th) Dim x as Double, y As Double, r as Double, th As Double End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!