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

Write m-function that computes simple returns as formula, Your Task: Write ...

Your Task: Write an M-function that computes simple returns as formula (1). Use this function to calculate the daily returns for each index. Using MATLAB build-in functions estimat

ANFIS, how to design a digital fir filter using anfis in matlab.get the cod...

how to design a digital fir filter using anfis in matlab.get the code for that.

Explain power system toolbox, Q. Explain Power system toolbox ? Power s...

Q. Explain Power system toolbox ? Power system toolbox (PST) was developed to enable users to perform power system analysis within MATLAB. PST may be used on any computer syste

Visual cryptography, how to implement visual cryptography on grayscale ima...

how to implement visual cryptography on grayscale images

Sopping function and upwind scheme, I am trying to implement this equation ...

I am trying to implement this equation u_t=-\u_x\ using upwind scheme. and as a second step, I need to put some stopping function g(h) where u_t=-g(h)\u_x\ how can I write this on

Relational expressions, Relational Expressions: The Conditions in if s...

Relational Expressions: The Conditions in if statements use expressions which are theoretically, or logically, either true or false. These expressions are termed as relational

Plot the function, Consider the 3rd order Bessel function J3(x). Write a sc...

Consider the 3rd order Bessel function J3(x). Write a script findBessRoots.m that computes all the roots of J3(x) in the interval [0; 40]. Your script must store the roots of the f

Size function - dimensions of matrix, Size function - Dimensions of matrix:...

Size function - Dimensions of matrix: For the matrix mat shown next, it has three rows and two columns, therefore the size is 3 × 2. The length is the larger dimension that is

Reading from a file, Reading from a File: A file has been once created...

Reading from a File: A file has been once created; it can be read into a matrix variable. When the file is a data file, the load function will read from the file filename.ext

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