ENME271Test309Sol

4 taxn005wcn scn13 tcnwcntaxnscn vn100

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: , ~..-:J:-t.Q ~ \~~"'*' .....'S •...., + Wl L ...:~. V \O\-t. • let % let V represent the volume of water used in hundreds of gallons. format bank V=[175 38 82]; L=length(V); for n=1:L if V(n)<=50 WC(n)=V(n)*0.4; tax(n)=0.05*WC(n); SC(n)=13; TC(n)=WC(n)+tax(n)+SC(n); V(n)<=100 elseif V(n)<=100 WC(n)=V(n)*0.45; tax(n)=0.05*WC(n); SC(n)=13; TC(n)=WC(n)+tax(n)+SC(n); else WC(n)=V(n)*0.5; tax(n)=WC(n)*0.05; SC(n)=13; TC(n)=WC(n)+tax(n)+SC(n); end end disp(' water use total bill') disp(' ') disp([V',TC']) clear all water use 175.00 38.00 82.00 total bill 104.88 28.96 51.74 function T=TF(P0,T0,P) T=T0.*(P./P0).^0.286; format format short P0=[15 20 10]; T0=[460 T0=[460 400 300]; P=[45 40 30]; T=TF(P0,T0,P) rho=P./(53.3*T) T= 629.8172 rho = 0.0013 0.0015 0.0014 487.7020 410.7503...
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.

Ask a homework question - tutors are online