Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started