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

Home » Public Forums » archive » Re: very simple Index question~~~help~~~
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: very simple Index question~~~help~~~ [message #62545 is a reply to message #62544] Mon, 15 September 2008 20:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> I have a very simple question , I have an 178*300 array, I want to
> read it line by line like this :
>
> print,diff(53399)
> print,diff(178*299+177) ;178*299+177=53399
>
> for i=0,177 do begin
> diff2(i)= diff(178*299+i)
> endfor
>
>
> Why it always remind me that it out of range in the second print
> statement. I mean 178*299+177 s exactly equal to 53399.

IDL arrays are indexed starting from 0 and not 1. If you
get to 53399, you have exceeded the bounds of the array,
which go from index 0 to 53398.

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
Read Message
Read Message
Read Message
Previous Topic: Re: IDL is giving me a syntax error out of nowhere
Next Topic: Exporting iPlot graphics to EPS files in vector format?

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

Current Time: Fri Oct 10 14:52:29 PDT 2025

Total time taken to generate the page: 1.44190 seconds