MATLAB Sec3.1 - EDU> matdat1 Undefined function or...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 EDU>> matdat1 ??? Undefined function or variable 'matdat1'. EDU>> A=[5,-2,1 EDU>> B=[2 2 3 EDU>> C=[1 -1 2 EDU>> D=[-1 2 3 EDU>> x=[-2 EDU>> A+B ans = 7 0 4 0 4 5 2 4 2 EDU>> A*B ans = 17 -1 13 22 -10 3 -3 16 -2 EDU>> D*C ans = -16 12 24 -25 19 46 EDU>> B-D ??? Error using ==> minus Matrix dimensions must agree. EDU>> %the error occured because B is a 3x3 matrix and D is a 2x3 matrix and in order to do subtraction the matrices must have the same dimensions EDU>> B*A ans = 3 17 16 -4 9 17 22 -10 -7 EDU>> C' ans = 1 0 -5
Image of page 1

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

View Full Document Right Arrow Icon
Sheet1 Page 2 -1 1 3 2 4 6 EDU>> C*x ans = -3 7 25 EDU>> x'*x ans = 14 EDU>> A^2 ans = 20 -3 -1 -7 26 9 -14 20 29 EDU>> 6*D ans = -6 12 18 0 24 30 EDU>> x*x ??? Error using ==> mtimes Inner matrix dimensions must agree. EDU>> % an error occured because with two matrices mxp and qxn in order two multiply p=q, and in this case the matrices were 3x1 and 3x1 and since 3 does not equal 1 the matrices could not be multiplied EDU>> ((A-B)*x)' ans = -20 -13 48 EDU>> A*A ans = 20 -3 -1 -7 26 9 -14 20 29
Image of page 2
Sheet1 Page 3 EDU>> 5*A-3*B ans = 19 -16 -4 08/12/17 -30 44 10 EDU>> %2.) EDU>> A=[1 3
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
Image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
Image of page 9

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern