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

Home » Public Forums » archive » Re: A simple vector - array operation
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: A simple vector - array operation [message #70904 is a reply to message #70903] Wed, 12 May 2010 08:29 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
francois writes:

> Let say that I have an array A of 25 columns by 100 lines and a vector
> V of 25 elements.
> I want that each line of A takes the value of V such that:
> for i=0, 99 do begin
> A[i,*] = V
> endfor
>
> What would be a fast way of doing this without using the FOR loop ?

a = Rebin(v, 25, 100)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: A simple vector - array operation
Next Topic: Re: Landsat HDF

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

Current Time: Wed Oct 08 19:58:01 PDT 2025

Total time taken to generate the page: 0.00182 seconds