Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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