disp(' ');
disp(' tire.m  ver 1.0  November 30, 2012 ');
disp(' by Tom Irvine ');
disp(' ');
disp(' This program calculates the vibration frequency of ');
disp(' a tire due to imbalance at a given speed. ');
disp(' ');
disp('  Select speed unit: ');
disp(' 1=mph  2=feet/sec  3=km/hr ');
iunit_speed=input(' ');
disp(' ');
%
% convert speed to m/sec
%
if(iunit_speed==1)
    speed=input(' Enter speed (mph) ');
    speed=speed*0.44704;
end
%
if(iunit_speed==2)
	speed=input(' Enter speed (ft/sec) ');
	speed=speed*0.3048;
end
%	
if(iunit_speed==3)	
    speed=input(' Enter speed (km/hr) ');
	speed=speed* 0.27778; 
end
%
disp(' ');
disp(' Select diameter unit: ');
disp(' 1=in  2=cm  ');
iunit_dia=input(' ');
disp(' ');
%
% convert diameter to m
%
if(iunit_dia==1)
	dia=input(' Enter diameter (inch) ');
	dia=dia*0.0254;
end
%
if(iunit_dia==2)
	dia=input(' Enter diameter (cm) ');
	dia=dia*0.01 ;
end
%
circum = pi*dia;
freq = speed/circum;
%
out1=sprintf('\n    Freq = %8.4g Hz',freq);
disp(out1);
out1=sprintf(' 2X Freq = %8.4g Hz\n',2*freq);
disp(out1);