23.12.2014 Views

MATLAB practice

MATLAB practice

MATLAB practice

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.

Some Important Standard Arrays<br />

zeros(M,N)<br />

ones(M,N)<br />

generates an M×N matrix of 0s of class double.<br />

generates an M×N matrix of 1s of class double.<br />

true(M,N) generates an M×N logical matrix of 1s.<br />

false(M,N) generates an M×N logical matrix of 0s.<br />

magic(M)<br />

rand(M,N)<br />

randn(M,N)<br />

generates an M×M "magic square".<br />

generates an M×N matrix whose entries are uniformly<br />

distributed random numbers in the interval<br />

[0,1].<br />

generates an M×N matrix whose numbers are normally<br />

distributed random numbers with mean 0 and<br />

variance 1.<br />

<strong>MATLAB</strong> – p. 50/333

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

Saved successfully!

Ooh no, something went wrong!