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

Home » Public Forums » archive » Adding arrays
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: Adding arrays [message #91473 is a reply to message #91471] Fri, 17 July 2015 11:26 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dete van Eeden writes:

> How do I define an array that consists of 5 arrays each with 256x256 elements?
>
> For example final(k) is the sum of the arrays from 1 to 5 and final=fltarr(256,256)
>
> It seems so simple but I cant get it right :-)

total = FltArr(256,256)
data = FltArr(256, 256, 5)
FOR j=0,4 do total = Temporary(total) + data[*,*,j]

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: creating arrays in loops
Next Topic: Creating KML error

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

Current Time: Wed Oct 08 13:31:53 PDT 2025

Total time taken to generate the page: 0.00418 seconds