chap 6

chap 6 - experiment = 1 2 3 4 5 mass = 110.0000 100.0000...

This preview shows pages 1–3. Sign up to view the full content.

%problem 6-3 (m-file) %determining total heat capacity clear, clc %define the mass vector mass=[250, 100, 10] %define the heat capacity vector heat=[.45, 4.2, .90] %multiply the number of mass times heat total= mass.*heat %add the total heat capacity total= sum(total) %dot calculations total= dot(mass,heat) mass = 250 100 10 heat = 0.4500 4.2000 0.9000 total = 112.5000 420.0000 9.0000 total = 541.5000 total = 541.5000 %problem 6-5 %determining total heat capacity clear, clc %define the experiment vector experiment= [1, 2, 3, 4, 5] %define the mass of water mass= [110, 100, 101, 98.6, 99.4] %define the heat capacity heat= [4.2] %define the vector y= [experiment;mass] %multiply the number of heat capacity times mass total= sum(y.*heat)

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

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

Unformatted text preview: experiment = 1 2 3 4 5 mass = 110.0000 100.0000 101.0000 98.6000 99.4000 heat = 4.2000 y = 1.0000 2.0000 3.0000 4.0000 5.0000 110.0000 100.0000 101.0000 98.6000 99.4000 total = 466.2000 428.4000 436.8000 430.9200 438.4800 %problem 6-11 clear, clc % solve matrix left division a a=[-2 1 1 1] b=[-3 3] x=inv(a)*b a =-2 1 1 1 b =-3 3 x = 2 1 %solve matrix left division b a= [10 -7 0-3 2 6 5 1 5] b=[7 4 6] x= inv(a)*b a = 10 -7 -3 2 6 5 1 5 b = 7 4 6 x = 0.3055-0.5636 1.0073 % solve matrix left division c a=[1 4 -1 1 2 7 1 -2 1 4 -1 2 3 -10 -2 5] b=[2 16-15-15] x=inv(a)*b a = 1 4 -1 1 2 7 1 -2 1 4 -1 2 3 -10 -2 5 b = 2 16-15-15 x = 5.6923-1.4615-19.1538-17.0000...
View Full Document

{[ snackBarMessage ]}

Page1 / 3

chap 6 - experiment = 1 2 3 4 5 mass = 110.0000 100.0000...

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

View Full Document
Ask a homework question - tutors are online