We started the day with matrix multiplication and manipulation. We learned that inner matrices must agree. We did an example of thermal couples and then one on distance of the height seen form mountain top. Lastly we moved on a free fall example on different planets.
Conclusion:
Matrices must have the same inner size. Use meshgrid when trying to plot data and to make different matrices size.
%Homework 9
atoms = [.78 .21 .01] %percent of n2,o2, ar
weight = [28 32 40] %g/mol of n2, o2, ar
air = dot(atoms,weight) %dot product of atmos and weight which is air
%9-2
set = [110 250 10; 100 250 10;101 250 10;98.6 250 10;99.4 250 10] %grams of water, steel, aluminum
heat = [4.2 .45 .9] %specific heat, water, steel, aluminum
heatcap = set*heat' %matrix multiplication for heat capacity
%9-3
a= [2 -1;4 5]
det(a)
b= [4 2;2 1]
det(b)
c= [2 0 0;1 2 2;5 -4 0]
det(c)
%9-4
r = [12/sqrt(2) 12/sqrt(2) 0]
f = [-100 20 0]
cross(r,f)
r1 = input('x y z:')
f1 = input('x y z:')
cross(r1,f1)
brack1 = [14 4 0]
brack2 = [2 4 0]
bt = [14 4 0;2 4 0]
force = [0 0 -10]
cross(brack1,force)
cross(bt,force)
cross(brack2,force)
No comments:
Post a Comment