Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How would i go about programming this program in Matlab Part 1 -User Defined Function-Creating damped.m Write a user defined function and save it in
How would i go about programming this program in Matlab
Part 1 -User Defined Function-Creating damped.m Write a user defined function and save it in a file named damped.m with an input of x and an output of y. Enter your name and section number as comments in the function file. The MATLAB function damped (x) should evaluate the mathematical function defined by: I. 2.5 The function must be written such that x can be a scalar or a vector input. Part 2 -Creating plotDamped.m Create a script called plotDamped. m and place comments at the top of the program (header) that includes: Name, Section, Date, and File Title. Create a vector called myX of evenly spaced values between 0 and 8 with 200 points. Call the function damped with the vector myx created in #3 as the only input argument. Create an animated plot using the output of damped. m over the domain defined in #3. The animation should have a red circle trace the outline of this function, with a trailing blue line behind it. An image of the plot during the animation is shown below. 2. 3. 4. 5, The x-axis should have a minimum value of 0 and a maximum value of 8. Similarly, the y-axis should have a minimum value of-1 and a maximum value of 1. 6. 7. Label the x-axis with x values' and the y-axis with 'y values and title the plot 'Damped Animation 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