Question: Write a function [ r , theta ] = polar _ coordinates ( x , y ) that outputs polar coordinates r and theta for
Write a function rtheta polarcoordinatesxy that outputs polar coordinates r and theta for input coordinates x and y given by two numbers.
IMPORTANT: to make things simple, assume that your x and y are two numbers NOT vectors This way you can use ifstatements.
Your theta should be in degrees in the range between and ie theta
HINT: if you are using inverse trigonometric functions, make sure you understand which range of values MATLAB is going to return. MATLAB may not automatically cover the required range of theta.Write a function theta polarcoordinates that outputs polar coordinates and theta for input coordinates and given by two numbers.
IMPORTANT: to make things simple, assume that your and are two numbers NOT vectors This way you can use ifstatements.
Your theta should be in degrees in the range between and ie theta
HINT: if you are using inverse trigonometric functions, make sure you understand which range of values MATLAB is going to return. MATLAB may not automatically cover the
required range of theta.
Function
function theta polarcoordinates
;
theta atan;
theta theta
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
