combine 2 row-vectors to a matrix [message #16438] |
Tue, 27 July 1999 00:00  |
kremasti
Messages: 3 Registered: July 1999
|
Junior Member |
|
|
Hi all,
i have the following problem.
I have two row vectors lets say A=[1,2,3] and B=[4,5,6] and I want to
create a matrix
M=[[1,2,3], $
[4,5,6]]
is there any command in IDL doing this thing.
thank you in advance
Eva Flevaris
|
|
|
Re: combine 2 row-vectors to a matrix [message #16519 is a reply to message #16438] |
Wed, 28 July 1999 00:00  |
Nando Iavarone
Messages: 48 Registered: December 1998
|
Member |
|
|
<HTML>
eva wrote:
<BLOCKQUOTE TYPE=CITE>i have the following problem.
<BR>I have two row vectors lets say A=[1,2,3] and B=[4,5,6] and I want
to
<BR>create a matrix
<P>M=[[1,2,3], $
<BR> [4,5,6]]
<P>is there any command in IDL doing this thing.</BLOCKQUOTE>
Maybe I don't understand well the problem.but if you do
<BR>A =[1,2,3]
<BR>B =[4,5,6]
<BR>M = [[A], [B]]
<BR>help, M
<BR>print,M
<BR>
<P>Is it the result you need?
<P>It is equivalent to the use of the reform:
<BR>M = [A, B]
<BR>M = reform(temporary(M), 3, 2)
<BR>
<PRE>--
Nando Iavarone
Advanced Computer System - SPACE DIVISION
via Lazzaro Belli, 23
00040 Frascati - RM
Tel: +39-6-944091 (switchboard)
9440968 (direct)
E-mail:
f.iavarone@acsys.it
FrdndVrn@altavista.net</PRE>
</HTML>
|
|
|