1. Engineering
  2. Mechanical Engineering
  3. using matlab can convert form 2 into 1 also following...

Question: using matlab can convert form 2 into 1 also following...

Question details

Using Matlab can convert form 2 into 1, also following the other steps and show the code that was used.Write A FUNCTION and follow the guidelines below: 1- The output of the function is the response or displacement x as a function of time, 2- The user has the chance to select one of the two options: converting form 1 to form 2 or vice versa, 3- Depending on the case selected in part 2, the user enters the constants for form 1 and all the constants for form 2 are calculated and shown one by one. Or vice versa - If the user wants to convert form 1 to form 2, the user enters A (Amplitude), w (natural frequency) and phi (phase angle) and then the function writes B and C constants and the complete form 2 on the command window. For example: Your response is -4.71sin(2t)+1.67cos(2t) - If the user wants to convert form 2 to form 1, they enter B and C and w and then the function writes A, w and phi on the screen with the complete form in terms of t. For example: Your response is 5sin(2t+2.8). Use conditional statements to locate the angle and inform the user where the angle is. (if both sin(phi) and cos(phi) are positive, the phase angle phi is in the 1st quadrant. If sin is positive and cos is negative, it is in 2nd quadrant. If both are negative, the angle is in 3rd quadrant. If sin is negative and cos is positive, it is in the 4th quadrant.) 4- The function then plots both responses (form 1 and form 2) as a function of time for One Compete Cycle. 5- It also plots displacement (x) velocity (v) and acceleration (a) on subplots (3 by 1) for One Complete Cycle.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution