help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: numel(foo{:}) - feature or bug ?


From: John W. Eaton
Subject: Re: numel(foo{:}) - feature or bug ?
Date: Sun, 7 Aug 2011 12:29:47 -0400

On  7-Aug-2011, Marco atzeri wrote:

| I found very un-intuitive that the order matters a lot
| 
|       numel (foo{1}, foo{2}, foo{3}, foo{4})
|       ans =  72
|       numel (foo{2}, foo{3}, foo{4},foo{1})
|       ans =  36
|       numel (foo{3}, foo{4},foo{1},foo{2})
|       numel (foo{4},foo{1},foo{2},foo{3})
|       ans =  6
| 
| specially if one of the element is empty
| 
|       foo{1}=[]
| 
|       numel (foo{4},foo{1},foo{2},foo{3})
|       ans = 0
|       numel (foo{3}, foo{4},foo{1},foo{2})
|       ans = 0
|       numel (foo{2}, foo{3}, foo{4},foo{1})
|       ans = 0
|       numel (foo{1}, foo{2}, foo{3}, foo{4})
|       ans =  72
| 
| 
| but this is coming from the definition.
| I wonder of the real usage of numel applied to a cs-list.

I think you are not understanding the difference between

  numel (A)

and

  numel (A, IDX1, IDX2, ...)

These are two completely separate things, which I explained here:

  https://mailman.cae.wisc.edu/pipermail/help-octave/2011-August/046952.html

and which is also explained by the documentation for numel.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]