Tuesday, November 16, 2010

MATLAB-7(FUNCTION SIZE)

in this article i want to discuss the function size.
size function returns the size of the array.
observe the following code:

x=[1 2 3 4];
[m,n]=size(x);
disp(m);
disp(n);

 the output of the above code is 1,4
here the size function gets the size of the array as 1*4 and it stores 1 in 'm' and 4 in 'n'.

No comments:

Post a Comment