Create a matlab script file, MATLAB Programming

Assignment Help:

Damped free vibrations can be modelled by considering a block of mass m that is attached to a spring and a dashpot as shown.

2474_Damped free vibrations.png

From Newton's second law of motion, the displacement x of the mass as a function of time can be determined by solving the differential equation:

2219_Damped free vibrations1.png

where k is the spring constant, and c is the damping coefficient of the dashpot. If the mass is displaced from its equilibrium position and then released, it will start oscillating back and forth. The nature of the oscillations depends on the size of the mass and the values of k and c.

(a) Create a MATLAB script file that calls for input of m, k, c, and xo. This file calls at least two functions i.e. function (b) that calculate x and v, and function (c) that animates the mass motion.

(b) Create a function M-file that calculates the displacement x and the velocity v of the mass, as function of time, t.

(c) Create another function M-file to create the animation of the mass motion.

(d) Demonstrate the program for two cases: 

(i) c = 3 N-s/m for 0 ≤ t ≤ 20s

(ii) c = 50 N-s/m for 0 ≤ t ≤ 10s

For the system shown in the figure m = 10kg, and k = 28 N/m. At time t = 0 the mass is  displaced to x = 0.18m, and then released from rest.

(e) Write a report describing your programs developed in (a), (b), and (c), and comment on your observation of the results from the two cases in (d).


Related Discussions:- Create a matlab script file

Calculate the distance between the two cars, Two cars started to move from ...

Two cars started to move from zero position with (φ = 35) as shown. For the next four minutes, do the following: 1. Calculate each car's distance from the zero position (Distanc

Compute the result - algorithms, Compute the result: To compute the ar...

Compute the result: To compute the area, the formula is required. In this situation, the area of the circle is π multiplied by the radius squared. Therefore, that means the va

Customizing a plot: line types, Customizing a Plot: Line Types, Color, Mark...

Customizing a Plot: Line Types, Color, Marker Types: Plots can be completed in the Command Window, if they are really simple. Though, at many times it is desirable to customiz

To change a variable, To change a variable: To change a variable, the ...

To change a variable: To change a variable, the other assignment statement can be used that assigns the value of a different expression to it. Consider, for illustration, the

Quiz2, 2)''dbcont'' command for debugging is used to Select one: a. Cont...

2)''dbcont'' command for debugging is used to Select one: a. Continue normal code execution from the debug prompt. b. List all breakpoints. c. Execute (step) one or more lines

Find the boundary between equations , Find the boundary between each two of...

Find the boundary between each two of the equations P1, P2, P3 by solving: P1 = P2  ,  P1 = P3  ,  P2 = P3 Plot the boundary lines on a single figure that also includes the

Airy equations, Need help programming in Matlab for airy equations

Need help programming in Matlab for airy equations

Plot the intensity distribution - numerical techniques, Using numerical tec...

Using numerical techniques, plot the intensity distribution for LP 01 and LP 11 modes. Vary the value of V (reduce it to 1.5) and plot several of the intensity plots (of LP 01 )

Expressions, Expressions: The Expressions can be formed using values, ...

Expressions: The Expressions can be formed using values, variables which have already been formed, operators, parentheses, and built-in functions. For numbers, these can invol

Error, what is an error and its types

what is an error and its types

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd