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
array subscripting problem [message #43426] Mon, 11 April 2005 06:00 Go to previous message
m.doyle is currently offline  m.doyle
Messages: 6
Registered: January 2004
Junior Member
Hi Guys,

I've got a gridded dataset and I'm searching the grid trying to find
those points which have a certain value. Once I've found this point, I
want to check all points around it to see if they have the same value
plus a little bit. This is what I've come up with:

If (data(i,j,k) GE p) THEN begin

cd = data(i,j,k)

If(ABS(cd-data[i-1,j-1,k]) LE mg) then f = f+1
If(ABS(cd-data[i, j-1,k]) LE mg) then f = f+1
If(ABS(cd-data[i+1,j-1,k]) LE mg) then f = f+1
If(ABS(cd-data[i-1,j, k]) LE mg) then f = f+1
If(ABS(cd-data[i+1,j, k]) LE mg) then f = f+1
If(ABS(cd-data[i-1,j+1,k]) LE mg) then f = f+1
If(ABS(cd-data[i, j+1,k]) LE mg) then f = f+1
If(ABS(cd-data[i+1,j+1,k]) LE mg) then f = f+1

endif

However, array subscripting with negative numbers isn't allowed by
IDL.

Has anyone any ideas how I might get around this?

Many thanks!

All the best
Martin
[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: Wed Oct 08 18:25:34 PDT 2025

Total time taken to generate the page: 0.00272 seconds