ENCH250 HW 5

ENCH250 HW 5 - 'Enter b c = input'Enter c if a< b< c disp[num2str(a num2str(b num2str(c elseif num2str(a< num2str(c< num2str(b

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

View Full Document Right Arrow Icon
Daniel Kish ENCH250 HW #5 1.4 n = input( 'Enter n: ' ) if n=0 disp( 'n! = 1' ) end if n < 0 disp( 'n! cannot be calculated' ) end if n > 0 while 0 < i < n x = i*(i - 1) end disp( 'n! = x' ) end 1.6 a) function [cpTacetone,cpTair,cpTmethane] = cpmat(T) for a = 28.94; b = .004147; c = .3191e-5; d = -1.965e-9; T = [0:100:1200]; cpTacetone = a + b*T + c*T.^2 + d*T.^3; end for a = 71.96; b = .2010; c = -12.78e-5; d = 34.76e-9; T = [0:100:1200]; cpTair = a + b*T + c*T.^2 + d*T.^3; end for a = 34.31; b = .05496; c = .3661e-5; d = -11e-9; T = [0:100:1200]; cpTmethane = a + b*T + c*T.^2 + d*T.^3; end b) c) 1.7 a = input( 'Enter a: ' ); b = input(
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: 'Enter b: ' ); c = input( 'Enter c: ' ); if a < b < c disp([num2str(a), num2str(b), num2str(c)]) elseif num2str(a) < num2str(c) < num2str(b) disp([num2str(a), num2str(c), num2str(b)]) elseif num2str(b) < num2str(a) < num2str(c) disp([num2str(b), num2str(a), num2str(c)]) elseif num2str(b) < num2str(c) < num2str(a) disp([num2str(b), num2str(c), num2str(a)]) elseif num2str(c) < num2str(b) < num2str(a) disp([num2str(c), num2str(b), num2str(a)]) elseif num2str(c) < num2str(a) < num2str(b) disp([num2str(c), num2str(a), num2str(b)]) end...
View Full Document

This note was uploaded on 04/28/2008 for the course ENCH 250 taught by Professor Adomaitis during the Spring '08 term at Maryland.

Page1 / 2

ENCH250 HW 5 - 'Enter b c = input'Enter c if a< b< c disp[num2str(a num2str(b num2str(c elseif num2str(a< num2str(c< num2str(b

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