12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

v =1122>> v*uans =1 2 0 11 2 0 12 4 0 22 4 0 2>> u*vans =5The matrix inverse can be found with the inv comm<strong>and</strong>:>> a = pascal(3)a =1 1 11 2 31 3 6>> inv(a)ans =3 -3 1-3 5 -21 -2 1>> a*inv(a)ans =1 0 00 1 00 0 1To multiply the elements <strong>of</strong> two matrices use the .* operator:>> a = [1 2;3 4]a =1 23 4>> b = [2 3;0 1]b =2 30 1>> a.*bans =2 60 4c○ 2000 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!