disp(' ');
disp(' vibration_absorber_trans.m   ver 1.1  May 16, 2011 ')
disp(' by Tom Irvine ');
%
close all;
%
clear arg;
clear tf;
%
disp('  ');
mu=input(' Enter (m2/m1):  ');
%
disp('  ');
omega_ratio=input(' Enter (omega22/omega11): ');
%
disp('  ');
damp=input(' Enter damping ratio ');
%
nf=401;
df=2.5/(nf-1);
%
arg=zeros(nf,1);
tf=zeros(nf,1);
%
j=sqrt(-1);
%
for i=1:nf
%    
     arg(i)=(i-1)*df;   % arg is omega/omega22
%
     beta=arg(i)*omega_ratio;
%
     kt=mu*omega_ratio^2+j*2*damp*mu*beta*arg(i) ;
%
     num=1-arg(i)^2+j*2*damp*arg(i);
%
     den=( 1 + kt - beta^2 +j*2*damp*mu*beta*arg(i) )*( 1 - arg(i)^2+j*2*damp*arg(i)  ) - kt;
%     
     if(abs(den)<1.0e-30)
% 
        den=1.0e-30;
%   
     end
%     
     T=abs(num/den);
%     
    tf(i)=T;
%    
end
%
va_trans=[arg tf];
%
figure(1);
plot(arg,tf);
grid on;