Advertisement
Guest User

big mac machine

a guest
Apr 27th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. %% Problem 4
  2. P = [.9 .01 .09, .01 .9 .01, .09 .09 .9]
  3. sump = sum(P)
  4. % a) P is a stochastic matrix, as all of its rows and columns add up to 1 and
  5. % each element is at least zero.
  6.  
  7. %b)The equation Pq=q tells us that if one of the eigen values is 1,
  8. % the others do not matter.
  9.  
  10. %c)Using the eig function on P yields in the following values:
  11. %0.4354
  12. %0.0909
  13. %0.4737
  14.  
  15. %[V,D] = eig(P)
  16.  
  17. %d)
  18. v=eig(sump)
  19.  
  20. %e) About 182 cars will be rented from the downtown location
  21. % 2000 * .0909
  22.  
  23. %% Problem 5
  24. a=7
  25. b= -8
  26. c = 1
  27.  
  28. C = [a -b, b a]
  29. E = [a -b, b a]
  30. D = [c 0, 0 c]
  31. factC = lu(C)
  32. factE = qz(E,D)
  33.  
  34. %I used LU factorization for C and QZ factorization for E.
  35. %You can obtain both types of factorization for the same matrix.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement