12.04.2015 Views

Solving Problems in Dynamics and Vibrations Using MATLAB ...

Solving Problems in Dynamics and Vibrations Using MATLAB ...

Solving Problems in Dynamics and Vibrations Using MATLAB ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14<br />

programs with larger step size. So you have to decide which is the best step size you can use for<br />

a given problem.<br />

In order to solve for different values of ξ, calculate the values of ‘c/m’ for each value of ξ.<br />

Substitute each value of ξ <strong>in</strong> the function file, which has the derivatives, save the file <strong>and</strong> then<br />

run the ma<strong>in</strong> program to view the result. This process might be too tedious. The code can be<br />

made more efficient by <strong>in</strong>corporat<strong>in</strong>g a ‘For loop’ for the various values of zeta.<br />

In the above code ‘y(:,1) represents the displacement ‘x’. To plot the velocity, change the<br />

variable <strong>in</strong> the plot comm<strong>and</strong> l<strong>in</strong>e to ‘y(:,2)’.<br />

The plot is attached below

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!