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

Home » Public Forums » archive » Bug in Trigrid ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Bug in Trigrid ? [message #1854] Thu, 24 March 1994 18:55 Go to previous message
hahn is currently offline  hahn
Messages: 108
Registered: November 1993
Senior Member
I found some erroneous data being generated on the boundary
by trigrid when interpolating x,y,z triplets into a matrix.
The problem depends on the system you run IDL on:
When you run the following program on a rs6000 or a pc you
get incorrect results while running on a sun you get
correct results. The problem occurs with version 3.1 and 3.5.1
of IDL (I don't have access to older version).

I assume that triangulate/trigrid is used very much I wonder
if there is a bug in IDL or in my program:

pro ttrig
x = findgen(30) ; generate some artifical data to show problem
y = x
Z = x # y + 200 ; matrix to plot as reference.

surface, z, zrange=[ 0, 1000 ]

; Now pick 30 values randomly choosen to feed into trigrid

seed = 12345
i = 30 * randomu ( seed, 30 )
j = 30 * randomu ( seed, 30 )
a = x(i)
b = y(j)
c = a * b + 200

triangulate, a, b, tr

zmat = trigrid ( a, b, c, tr )

; zmat should be very close the the original matrix Z above
; or am I missing something ???

window, 1 ; open another window for a-b comparison

surface, zmat, zrange=[ 0, 1000 ] ; qed

end
[Message index]
 
Read Message
Read Message
Previous Topic: reading JCAMP files
Next Topic: Looking for material on PV-WAVE

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

Current Time: Wed Oct 08 16:07:05 PDT 2025

Total time taken to generate the page: 0.00217 seconds