Question: Using Matlab Use 5 at 45 degrees Write a function called DtoR() to convert degrees to radians. (4 lines) Write a function called Vector) that

 Using Matlab Use 5 at 45 degrees Write a function called

Using Matlab

Use 5 at 45 degrees Write a function called DtoR() to convert degrees to radians. (4 lines) Write a function called Vector) that will return the X and Y values for a vector (a physics vector of a magnitude and angle, not a MatLab vector). The function will use magnitude and angle in degrees as the input arguments and will return the X magnitude cos (angle) and Y = magnitude * sin (angle). Use your DtoR function to convert the input argument of angle from degrees to radians and use the MatLab built in functions of sin) and cos(). Do not use sindo or cosdo. (5 to 7 lines) Write a script that will ask the user for two vectors, expressed as magnitude and angle in degrees. This will be four input () functions. Then add these two vectors together by calling the function Vector() for each and then adding the X values and Y values. Calculate the new magnitude using (X2 +Y2). Then output the result in a sentence using fprintf (). Extra credit if you calculate the resultant angle using tan() in your script and include this in your fprint). (about 8 lines)

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!