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 
Return to the default flat view Create a new topic Submit Reply
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>
[Message index]
 
Read Message
Read Message
Previous Topic: Re: subsripting array problem
Next Topic: Infering who the user is?

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

Current Time: Tue Dec 02 18:34:07 PST 2025

Total time taken to generate the page: 0.39818 seconds