Matlab for the Behavioral Sciences by Fine Ione & Boynton Geoffrey

Matlab for the Behavioral Sciences by Fine Ione & Boynton Geoffrey

Author:Fine, Ione & Boynton, Geoffrey [Fine, Ione]
Language: eng
Format: azw3
Published: 2013-05-06T16:00:00+00:00

All this in a seven line program! Notice that there aren't any for loops either. The trick is the meshgrid command that takes in the vector ranging from -2 to 2, and returns two matrices which we've called X and Y.

Let's take a look at sizes of these two matrices X and Y.

size(X)

ans =

101 101

size(Y)

ans =

101 101

They're both 101 by 101 matrices, where 101 is the length of the vector that was sent into meshgrid. Let's look more closely at these matrices.

figure(1); clf

imagesc(X);

colormap(gray(256))



Loading...
Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Web Analytics