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

Home » Public Forums » archive » Re: how can i get an [n,1] array without reform?
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: how can i get an [n,1] array without reform? [message #63898 is a reply to message #63826] Fri, 21 November 2008 07:28 Go to previous message
mccreigh is currently offline  mccreigh
Messages: 13
Registered: January 2008
Junior Member
> Hi
>
> that can be also solved by
>
> if size(a, /n_dim) eq 1 and size(b, /n_dim) eq 1 then $
>     c = [[a],[b]] $
> else ....
>
> cheers
> Reimar

In my version of IDL (6.4.1), that gives a column vector of dimension
[1,2]. Which is not a solution, no free beer for you. Try again! :)

But that's OK, i will accept that it cant be done without reform.
Fortunately, in my code i already have a surrogate variable which
implies the dimension of a and b. But I still have to test (n eq
max-1) unnecessarily in all but one case, seems like a waste.

Should we all avoid using and concatenating column vectors then and
just use row vectors? I guess I could just put these in an array right
off the bat and avoid concatenation all together. That seems like it
would be faster anyway, if i'm really concerned with speed.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Adding sparse matrices
Next Topic: AVIs for the Mac

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

Current Time: Fri Oct 10 20:02:06 PDT 2025

Total time taken to generate the page: 0.48033 seconds