Create a matlab script file, MATLAB Programming

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).

Posted Date: 3/19/2013 2:38:23 AM | Location : United States







Related Discussions:- Create a matlab script file, Assignment Help, Ask Question on Create a matlab script file, Get Answer, Expert's Help, Create a matlab script file Discussions

Write discussion on Create a matlab script file
Your posts are moderated
Related Questions
The occurrence of bushfires in the Port Stephens area may be modelled by a Poisson process. The average occurrences of bushfires n is assumed to be either 15 (event A 1 ), 20 (even

Matrices of random numbers: The Matrices of random numbers can be generated using the rand and randint functions. The first two arguments in the randint function identify the

Operators: There are in general two types of operators: unary operators that operate on a single value or operand; and binary operators, that operate on two values or operands

how to write the national log (ln(x)) in matlap ?

Implement a MatLab function to calculate y.  The function should take two input arguments 1) A vector of parameters In the above example this would be of length 3, the first

I want to know how to create a numerical solution code for analysing temperature/isotherms on a 2d square plate with a singular heat source and opposing edges being held at constan

illustration of for loop: illustration, to print a column of numbers from 1 to 5: for i = 1:5 fprintf('%d\n',i) end   This loop can be entered in the Command Wi

This project carries 50% of your ?nal mark. Please hand in your work to the Mathematical and Physical Sciences School O?ce, no later than 4pm Monday 21st January 2013. Please ?l

Example of Linear indexing: For illustration, the following substitutes the whole second row with values from a vector  The whole row or column could also be changed : >> m

Error-Checking user input in the While Loop: In many applications, whenever the user is prompted to enter anything, there is a valid range of values. When the user enters a wr