From: dale on
Hello ,

Is there anyway to count the number of operands in Matlab?

For example,


If, u = [1, 4, 9]

The number of operands n is:

n = 3.


How can this be done.

thanks.


From: Walter Roberson on
dale wrote:

> Is there anyway to count the number of operands in Matlab?
>
> For example,
>
> If, u = [1, 4, 9]
> The number of operands n is:
>
> n = 3.

See the documentation for size(), length(), and nargin()