Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

3. Define the attributions we use to explain behavior

Answered: 1 week ago