Hello,
I'm trying to display unevenly spaced data with either cw3dgraph or as intensity plot. Following the thread about the 'griddata' command (
http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=249724#M249724), I tried to modify the given vi 'griddata example.vi' to display my own data. The modified vi is attached. In the following, I will refer to the data from 'griddata example.vi' as original data. Both the results from a LabVIEW MathScript Node and a MATLAB Script Node are displayed in the vi for comparison.
Using the original data, all four possible interpolation methods (linear, nearest, cubic, v4) seem to work properly for both nodes. However, there are differences in the outputs of both nodes. This is best visible when a small number for N is chosen (where N is the number of interpolated points). I can't quite understand why the plots are different, as the interpolation methods are seemingly the same in both nodes.
The problem of far greater concern however is described next. I formatted my own data to match the original one. Nevertheless, when using my own data in the code, only the MATLAB Script Node returns results for all interpolation methods. The MathScript Node works fine in the cases 'nearest' and 'v4'. Both other methods, 'cubic' and 'linear', return a 0-matrix for Z. As I want to use the 'cubic' interpolation method and LabVIEW only, this is quite unfortunate. The idea to use a surface or parametric plot on the data directly was refrained from, due to the problems described in an earlier thread (
http://forums.ni.com/ni/board/message?board.id=170&message.id=268631). Rearranging the y-column in a descending order in my own data according to the y-column in the original data did not change the outcome.
In the attached vi, both the original and my own data look the same to me - except for the values of course. Nevertheless, the above mentioned problems exist. I would really appreciate, if you gave me a hint why I can't display my data, and - if possible - why the two nodes produce different outputs. Thank you.
I'm using LabVIEW 8.5.
Message Edited by lehmann_frank on
04-02-2008 07:56 AM