comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: transforming a row vector into a column vector (continued)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: transforming a row vector into a column vector (continued) [message #46029 is a reply to message #46022] Tue, 25 October 2005 07:48 Go to previous message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi Francois,

well, the answer is already in your post :-)

What does the output of size(b) actuall mean?
The first "2" tells us that b is 2-dimensional.
The following "1" tells us that the number of columns (the x-dimension)
is 1.
The following "4" tells us that the number of rows (the y-dimension) is
4.

Voila, that's the definition of a column vector, isn't it? It has one
column and n rows.

IDL does not know different types of vectors, a vector in its
1-dimensional form always is a row vector.

As for your second question, again the answer is in your post: The
"possibility for knowing what type an array is" is the SIZE() command:

case 1 of
(size(array))[0] eq 1:print, "This array is a row vector"
(size(array))[0] eq 2: print, (size(array))[1] eq 1 $
? "This array is a column vector" $
: "This array really is a 2D array"
else: print, "This array has even more dimensions"
endcase

Cheers,

Peter
[Message index]
 
Read Message
Read Message
Previous Topic: orthogonal distance regression
Next Topic: A color table for topography

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 16:17:32 PDT 2025

Total time taken to generate the page: 0.56180 seconds