Question: Write a function polar.m file that will convert vectors V in Cartesian coordinates (x, y) to polar coordinate system as (r, ? ), where r
Write a function polar.m file that will convert vectors V in Cartesian coordinates (x, y) to polar coordinate system as (r, ? ), where r is the magnitude and ? is the angle in degree
function [r, theta] = polar(x,y) (note: use mag.m in problem 1) for magnitude calculation; use atan2(y,x) for angle calculation)
Test vectors V1=[-7.3, 12.5] and V2=[0, 45] to magnitudes and angles
problem 1)
Write a mathematical function mag.m file that is defined as mag(x, y) = sqrt(x^2+y^2)
Test the function to see what are the magnitudes of vectors [3.0 4.0] and [89.4 45.7]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
