Re: how to determine a length of a vector
- From: "Randy Poe" <poespam-trap@xxxxxxxxx>
- Date: 17 Jul 2006 10:26:15 -0700
Steve Amphlett wrote:
Randy Poe wrote:
size(Y) will give you the array dimensions. length(Y)
will give you the first dimension.
That description of length always catches me out as I extend my code
from one to two dimensions. length(x) actually returns the same as
max(size(x)), so there will be a point where it flips from one
dimension to another as the arrays grow.
Yes, that was a stupid brain hiccup on my part.
I should have known better as I have a preference for
row vectors and I use length all the time on those.
- Randy
.
- References:
- how to determine a length of a vector
- From: Tessa
- Re: how to determine a length of a vector
- From: Randy Poe
- Re: how to determine a length of a vector
- From: Steve Amphlett
- how to determine a length of a vector
- Prev by Date: Re: Matrix indexing: bug or wanted?
- Next by Date: Re: Invalid Mex file????
- Previous by thread: Re: how to determine a length of a vector
- Next by thread: weird
- Index(es):
Relevant Pages
|