Posts

Showing posts with the label matlab

Viscosity mu is property of gases and fluids that characterises their resistance to flow. For most materials viscosity is highly sensitive to temperature. Below is a table that gives the viscosity of SAE 10w oil at different temperatures. Determine an equation that can be fitted to the data.

Image
Question :   Viscosity mu is property of gases and fluids that characterises their resistance to flow. For most materials viscosity is highly sensitive to temperature. Below is a table that gives the viscosity of SAE 10w oil at different temperatures. Determine an equation that can be fitted to the data. T 0 c -20 0 20 40 60 80 100 120 mu(N-s/m 2 ) 4.0000 .38 .095 .032 0.0150 0.0078 0.0045 0.0032 %in script file T=[-20:20:120]; mu=[4 0.38 0.095 0.032 0.015 0.0078 0.0045 0.0032]; Tk=T+273; P=polyfit(Tk,log(mu),2); Tplot=273+(-20:120); muplot=exp(P(1)*Tplot.^2+P(2)*Tplot+P(3)); semilogy(Tk,mu,'r',Tplot,muplot); xlabel('temperature(kelvin)' ylabel('viscosity(N-S/M^2)') title('Given data fitted as shown in plot') Matlab for engineers

8. The outside dimensions of a rectangular box(top open) made of aluminium are 24x12x4 inches. the wall thickness of the bottom and the sides is x. derive an expression that relates the weight of the box and the wall thickness x. determine the thickness x for the box that weighs 15 lbs. The specific weight of the alumininum is 0.101 lb/cubic inch.

Question : The outside dimensions of a rectangular box(top open) made of aluminium are 24x12x4 inches. the wall thickness of the bottom and the sides is x. derive an expression that relates the weight of the box and the wall thickness x. determine the thickness x for the box that weighs 15 lbs. The specific weight of the alumininum is 0.101 lb/cubic inch.   Using Matlab 7.0 software %in script file w=15; gama=0.101; Val=w/gama; a=[-2 24]; b=[-1 4]; c=[-1 4]; Vin=conv(c,conv(a,b)); polyequation=[0 0 0 (Val-24*12*4)]+Vin r=roots(polyequation); %in command window >> wallthickness polyequation =    -2.0000    40.0000 -224.0000 -619.4851  for mechanical engineering,electronics engineer,engineers.

a cylindrical silo with radius r has a spherical cap roof with radius R. the height of the cylindrical portion is H. write a program in a script file that determines the height H for given values of r, R and the volume V. In addition, the program also calculates the surface area of the silo. Use the program to calculate the height and surface area of a silo with r=30 m , R=45m and volume of 120000 cubic metre.. assign values for r,R and V in the command window.

Problem : A cylindrical silo with radius r has a spherical cap roof with radius R. the height of the cylindrical portion is H. write a program in a script file that determines the height H for given values of r, R and the volume V. In addition, the program also calculates the surface area of the silo. Use the program to calculate the height and surface area of a silo with r=30 m , R=45m  and volume of 120000 cubic metre.. assign values for r,R and V in the command window. USING MATLAB 7.0 SOFTWARE % in script file theta=asin(r/R); h=r*(1-cos(theta)); Vcap=pi*h^2*(3*R-h)/3; H=(V-Vcap)/(pi*r^2); s=2*pi*(r*H+R*h); fprintf('the height H is %f mt',H) fprintf('\n the surface area of silo is %f',s) % command window >> r=30; >> R=45; >> V=120000; >> silo the height H is 39.688478 mt  the surface area of silo is 9641.068715>>

create a function file that calculates the trajectory of a projectile. The inputs to the function are the initial velocity and the angle at which the projectile is fired. The outputs from the function are the maximum height and distance. In addition, the function generates a plot of the trajectory. Use the function to calculate the trajectory of a projectile that is fired at a velocity of 230 m/sec at an angle of 39deg.

Image
Problem :                                 create a function file that calculates the trajectory of a projectile. The inputs to the function are the initial velocity and the angle at which the projectile is fired. The outputs from the function are the maximum height and distance. In addition, the function generates a plot of the trajectory. Use the function to calculate the trajectory of a projectile that is fired at a velocity of 230 m/sec at an angle of 39deg.  USING MATLAB SOFTWARE Version 7.0 SOLUTION:- %Write it in script file function[hmax,dmax]=trajectory(V0,theta)               g=9.81; V0x=V0*cos(theta); V0y=V0*sin(theta); thmax=V0y/g; hmax=V0y^2/(2*g); ttotal=2*thmax dmax=V0x*ttotal  % creating a trajectory plot tplot=linspace(0,ttotal,200); x=V0x*tplot; y=V0y*tplot-0.5*g*tplot...

The co-efficient of friction mu can be determined in an experiment by measuring the force F required to move a mass m. when F is measured and m is known the coefficient of friction can be calculated by mu=F/mg (g=9.81 m/sec2) results from measuring F in six tests are given in the table below. Determine the coefficient of friction in each test, and average from all tests.

Problem :                            The co-efficient of friction mu can be determined in an experiment by measuring the force F required to move a mass m. when F is measured and m is known the coefficient of friction can be calculated by mu=F/mg (g=9.81 m/sec 2) results from measuring F in six tests are given in the table below. Determine the coefficient of friction in each test, and average from all tests. Test # 1 2 3 4 5 6 Mass m-kg 2 4 5 10 20 50 Force F -N 12.5 23.5 30 61 117 294 USING MATLAB SOFTWARE SOLUTION: %IN COMMAND WINDOW >> m=[2 3 5 10 20 50]; >>   f=[12.5 23.5 50 61 117 294]; >>   mu=f./(m*9.8) mu =     0.6378     0.7993     1.0204     0.6224 ...

Three forces are applied to a bracket as shown. Determine the total (equivalent) force applied to the barcket

Problem:          % Three forces are applied to a bracket as shown. Determine the total (equivalent) force applied to the barcket% %IN COMMAND WINDOW >> F1m=400;F2m=500;F3m=700; >> Th1=-20*pi/180;Th2=30*pi/180;Th3=143*pi/180; >> F1=F1m*[cos(Th1) sin(Th1)] F1 =   375.8770 -136.8081 >> F2=F2m*[cos(Th2) sin(Th2)] F2 =   433.0127   250.0000 >> F3=F3m*[cos(Th3) sin(Th3)] F3 =  -559.0449   421.2705 >> Ftotal=F1+F2+F3 Ftotal =   249.8449   534.4625 >> Ftotalm=sqrt(Ftotal(1)^2+Ftotal(2)^2) Ftotalm =   589.9768 >> Th=(180/pi)*tan(Ftotal(2)/Ftotal(1)) Th =   -89.7088

To determine Nearest of temp after 3 hours

Problem : To determine Nearest of temp after 3 hours.. >>% To determine Nearest of temp after 3 hours..% >> Ts=38;T0=120;K=0.45;t=3; >> T=round(Ts+(T0-Ts)*exp(-K*t)) T = 59

A trigonometric identity is given by cos2(x/2)=(tanx+sinx)/2.tanx verify that the identity is correct by calculating each side of the equation substituting x=pi/5

  Problem :          A trigonometric identity is given by cos2(x/2)=(tanx+sinx)/2.tanx verify that the identity is correct by calculating each side of the equation substituting x=pi/5 >> %A trigonometric identity is given by cos2(x/2)=(tanx+sinx)/2.tanx verify that the identity is correct by calculating each side of the equation substituting x=pi/5% >> x=pi/5; >> LHS=cos(x/2)^2 LHS = 0.9045 >> RHS=(tan(x)+sin(x))/(2*tan(x)) RHS = 0.9045