20.07.2013 Views

Software matematic

Software matematic

Software matematic

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.

16 Introducere în MATLAB<br />

ans =<br />

1 4<br />

9 16<br />

Operat¸ia .ˆ permite ca exponentul să fie un tablou când dimensiunile bazei s¸i<br />

exponentului coincid, sau când baza este un scalar:<br />

>> x=[1 2 3]; y=[2 3 4]; Z=[1 2; 3 4];<br />

>> x.ˆy<br />

ans =<br />

1 8 81<br />

>> 2.ˆx<br />

ans =<br />

2 4 8<br />

>> 2.ˆZ<br />

ans =<br />

2 4<br />

8 16<br />

Ridicarea la putere a matricelor este definită pentru toate puterile, nu numai<br />

pentru întregi pozitivi. Dacă n> x=[-1 0 1]’; y=[3 4 5]’;<br />

>> x’*y<br />

ans =<br />

2<br />

>> dot(x,y)<br />

ans =<br />

2<br />

>> cross(x,y)<br />

ans =<br />

-4<br />

8<br />

-4

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

Saved successfully!

Ooh no, something went wrong!