solution12

Solution12 - fprintf'Flow rate using trapz =%5.2f cubic ft/s,Qb disp Part(c Qc=quad'5(1-r.^2*2*pi*r,0,1 fprintf'Flow rate using quad =%5.2f cubic

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
% Assignment 12 % Prob. 1 f1=inline('exp(-x)'); F1=f1([1:5]) F1 = 0.36788 0.13534 0.049787 0.018316 0.0067379 % Prob. 2 f2=inline('cos(a*x)/(b+2)','a','b','x'); F2=f2(2,3,[0.1 0.2 0.3]) F2 = 0.19601 0.18421 0.16507 % Prob. 3 f3=inline('(x+2).*tan(y)','x','y'); F3=f3([0:1:5],[0:0.5:2.5]) F3 = 0 1.6389 6.2296 70.507 -13.11 -5.2292 % Prob. 4 % See handwritten page for part (a) % Part (b) r=0:0.1:1; A=pi*r.^2; V=5*(1-r.^2); Qb=trapz(A,V);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fprintf('Flow rate using trapz = %5.2f cubic ft/s',Qb) disp(' ') % Part (c) Qc=quad('5*(1-r.^2)*2*pi.*r',0,1); fprintf('Flow rate using quad = %5.2f cubic ft/s\n',Qc) disp(' ') Flow rate using trapz = 7.85 cubic ft/s Flow rate using quad = % Prob 5 r=0:0.1:1; V=[5.04 4.93 4.74 4.6 4.26 3.73 3.30 2.51 1.78 0.97 0]; A=pi*r.^2; Q=trapz(A,V); fprintf('The flow rate = %5.2f cubic ft/s',Q) The flow rate = 7.89 cubic ft/s...
View Full Document

This note was uploaded on 02/27/2010 for the course ENME 271 taught by Professor Marks during the Summer '08 term at Maryland.

Page1 / 2

Solution12 - fprintf'Flow rate using trapz =%5.2f cubic ft/s,Qb disp Part(c Qc=quad'5(1-r.^2*2*pi*r,0,1 fprintf'Flow rate using quad =%5.2f cubic

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online