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

Home » Public Forums » archive » array subscripting problem
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: array subscripting [message #69155 is a reply to message #43426] Fri, 11 December 2009 06:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dave Higgins writes:

> I'd like to multiply the 1st dimension of a multi-dimensional array by
> a 1d vector (using * not #). I've been trying to avoid nested FOR
> loops. So far, I've come up with
>
> phi = rebin(phi, dim1,dim2,dim3,dim4,dim5)
> multi_dim_arr = multi_dim_arr * phi
>
> As you can see I'm creating a huge array from a simple "row" of data,
> so that phi and multi_dim_arr match in size. I feel like I'm missing
> something - is there an easier way to get this done?

"Easier" in what sense? To type? Make it a function. ;-)

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
Read Message
Previous Topic: renaming a variable without making a copy
Next Topic: learn CPP with in 2 weeks

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

Current Time: Fri Oct 10 07:08:24 PDT 2025

Total time taken to generate the page: 0.64174 seconds