Ski boot walking attachment appendix
From DDL Wiki
Contents |
Code
Logarithmic Decrement
readenct.m
Reads in the text file generated by the MSE Rectilinear apparatus.
function [t,f,val]=readenct(filename,vd,encnum) a=textread(filename,'','headerlines',23); if strcmp(vd,'d') val=-a(:,encnum+1); end if strcmp(vd,'v') val=-a(:,encnum+5); end t=a(:,1); f=a(:,2);
num4.m
Using the data returned by readenct, allows determination of physical constants using logarithmic decrament analysis.
[time,force,displacement]=readenct('medium_natural.txt','d',1); figure(1) plot(time,displacement+0.1198); axis([10.6 11.4 -4 4.2]) a=ginput c=max(a) figure(2) plot(time,displacement+0.1198); axis([10.6 11.4 -4 4.2]) b=ginput d=max(b) prompt={'Number of Peaks in between','X Coordinate First MAX.','X Coordinate Second MAX.'} name='Get User Input'; numlines=1; defaultanswer={'0','0','0'}; answer=inputdlg(prompt,name,numlines,defaultanswer); n=str2double(answer{1}); x1=str2double(answer{2}); x2=str2double(answer{3}); T=(x2-x1)/(n); dampingRatio=((1/(n-1))*(log(c(1,2)/d(1,2))))/sqrt((4*pi^2)+((1/(n-1))*(log(c(1,2)/d(1,2))))^2) naturalFrequency=((1/(n-1))*log(c(1,2)/d(1,2)))/(dampingRatio*T) dampedNaturalFrequency=naturalFrequency*sqrt(1-dampingRatio^2) m=0.79; k=naturalFrequency^2*m CoefficientOfDamping=dampingRatio*2*sqrt(k*m)