Re2: Bug in Trigrid ? [message #1852] |
Fri, 25 March 1994 13:47 |
hahn
Messages: 108 Registered: November 1993
|
Senior Member |
|
|
In article <dogru.764572117@pico> dogru@pico.cs.umn.edu (Sait Dogru) writes:
> I too faced this problem a while back, but I am not sure if you can
> call it a *bug*. This is just how trigrid handles so-called
> missing values.
Actually the example program I supplied was too simple. My real application
has non-zero values on every point on the border. What I get from trigrid
is a matrix with 3 correct sides and one side with zeros. Of course I can
always rescale the matrix by
zmat = zmat(0:49,*)
to get rid of the line of zeros but I feel this should be different. *And*
the results on a SUN are o.k. without rescaling.
This is why I would call it a bug!
> There is also an optional keyword that lets you
> change the value to be used for these missing points. (The default
> is 0.)
This doesn't help for me because there are no missing data in my application
and if I could extend the data beyond the definition a constant wouldn't
help. Acutally, the expected plot should look like a hammock.
> What I did was trim the output matrix of trigrid on all
> 4 sides and eliminate the rows/columns containing all zeros. Then,
> I plotted the smaller matrix using surface or a similar 3D plotting
> function. This usually produces better results, but sometimes the
> improvement is minimal, which was the case for the output of your
> program.
But I have to clip only one row (or column) !! That's to strange to call it
a feature.
> Another problem with trigrid is the ranges of the X/Y axes. They
> always default to 50. Although you can change the size of the
> output matrix, X and Y ranges still won't correspond to the actual
> data ranges of your X/Y values, which calls for another set of
> tricks to handle correctly. (In your program, for example, x and y
> values were from 0 to 30 but the ticks on X/Y ranges read 0 to 50.)
If I understand trigrid well enough, it uses the x,y,z triplets to
interpolate a matrix on a regular grid. If you pass only this matrix to
surface or a similar routine, this routine has no "knowledge" of the x,y
underlaying the z-matrix. Thus, by default, the annotation gives you the index
numbers, going from 0 to 50. So I feel it's pretty normal that you have to
supply the real x and y values for correct annotation.
> I am using an RS600 and we recently switched from version 3.1. to
> 3.5.1. Both versions have this problem, so I don't know why trigrid
> seems to work fine for you on Suns, though.
Unfortunately I don't have quick and easy access to a sun so I can't tell if
the individual zmat-values are identical and there is just an extra row of
zeros added on a rs6000 or a pc. I'm scared however, the matrix values may
differ between different workstations...
>
> Sait
> dogru@cs.umn.edu
Thanks for your help!
Norbert Hahn
University at Darmstadt,
Germay
|
|
|