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

Home » Public Forums » archive » combine 2 row-vectors to a matrix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
combine 2 row-vectors to a matrix [message #16438] Tue, 27 July 1999 00:00 Go to next message
kremasti is currently offline  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 Go to previous message
Nando Iavarone is currently offline  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> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [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&nbsp; =[1,2,3]
<BR>B&nbsp; =[4,5,6]
<BR>M = [[A], [B]]
<BR>help, M
<BR>print,M
<BR>&nbsp;

<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>&nbsp;
<PRE>--&nbsp;
Nando Iavarone
Advanced Computer System - SPACE DIVISION
via Lazzaro Belli, 23
00040&nbsp; Frascati - RM
Tel: +39-6-944091 (switchboard)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 9440968 (direct)
E-mail:&nbsp;
&nbsp;&nbsp;&nbsp; f.iavarone@acsys.it
&nbsp;&nbsp;&nbsp; FrdndVrn@altavista.net</PRE>
&nbsp;</HTML>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: subsripting array problem
Next Topic: Infering who the user is?

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

Current Time: Sat Oct 11 09:18:41 PDT 2025

Total time taken to generate the page: 0.48121 seconds