So each columne of the 26683x6 matrix represents one of the coordinates or components?
Are x/y/z monotonic? If so, you should be able to reshape() each of the channels ino a three-d matrix and call curl directly. If they are not, you will need to generate monotonic coordinates (with meshgrid() or ndgrid() and interpolate to these values with TriScatteredInterp(). From here call curl directly.
More per comments:
Matrix was your 26683x6 matrix. I was assuming it was of the form [x y z u v w] or similar. Thus you extract the columns of it to figure out how to mesh the data.
So in the above you would have something like:
[xx yy zz] = meshgrid(0:238,120,0:148)
Now create the interpolant object for each vector component:
Fu = TriScatteredInterp(Matrix(:,1),Matrix(:,2),Matrix(:,3), Matrix(:,4));
Then to get the results for curl, calculate the vector components with the corresponding interpolant on the above meshgrid output:
Then call curl after doing this:
Best Answer