With 400 Nm m 10 kg c 3 E Let x c 2 m t Acos t Bsin m 4 m kg

With 400 N/m, m 10 kg, c 3 E. Let x c/ 2 m t Acos t Bsin m 4 m kg/s, A 1 m, and B 0, plot x and the exponential envelope on a single subplot and on a second subplot plot just Acos adt and use the plots to determine the amplitude of each of the first four cycles of the oscilation. (functions to try: plot, subplot, ginput, linspace)

Solution

clc;
%clear all;
close all;
%give constants
k=400;
m=10;
c=3
wd1=sqrt( k/m -(c^2/(4*m^2)) );
wd=wd1*pi/180;
%t=1
A=1;
B=0;
%%%%
t=linspace(0,50);
a1=exp(-c*t/(2*m));
a2=A*cos(wd*t);
a3=B*sin(wd*t);
x=a1.*(a2+a3); %%%equation (i)
subplot(1,2,1)
plot(t,x,\'r\')
hold on
plot(t,a1,\'b\')
legend(\'x\',\'envelope\')
xlabel(\'t\')
ylabel(\'amplitude of x\')
subplot(1,2,2)
t=linspace(0,180);
a2=A*cos(wd*t);
plot(t,a2,\'c\')
xlabel(\'t\')
ylabel(\'amplitude\')

%%%%Now type in the coomand window [xp,yp]=ginput
% the plot window will open , and a cursor will appear
% selct the four maximum amplitudes of the second graph and hit enter
% in command window the (x,y) coordinate of the maximum amplitudes of the
% four cycle will be displayed.
% Take the x-cordinates xp = [ 0 56.9147 113.6324 171.5317 ]%%
% Now calculate the amplitudes of the first four cycle by calculating x from equation (i),
% putting t=xp(1), t=xp(2), t=xp(3) t=xp(4)
% this will give us first four amplitude as 1, 1.9604e-04 3.9583e-08 6.6943e-12

 With 400 N/m, m 10 kg, c 3 E. Let x c/ 2 m t Acos t Bsin m 4 m kg/s, A 1 m, and B 0, plot x and the exponential envelope on a single subplot and on a second su

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site