Option to generating isosurface?

1 view (last 30 days)
Esteban
Esteban on 9 May 2012
Hi, I have three 56x56 matrices X1, X2, X3 and a 56x56x56 'data' matrix (containing values between 0 and 1) attached to each of the three matrices' combinations. I used an iso-surface command to grab all the components in the 56x56x56 matrix that are below 0.5 and color them red. In the following manner:
data(data<=0.5)=0.500000;
fp=patch(isosurface(x1, x2, x3, data, 0.500000));
isonormals(x1, x2, x3, Error,fp);
set(fp, 'FaceColor', 'red', 'EdgeColor', 'none');
However a lot of the x1 and x3 values equal 1 and this causes issues when interpolating and creating the grid. I obtain the following errors:
Error using griddedInterpolant
The grid was created from grid vectors that were not strictly monotonic
increasing.
Error in interp3 (line 138)
F = griddedInterpolant(X, Y, Z, V, method);
Error in isonormals (line 76)
n(:,1)=interp3(x, y, z, nx, verts(:,1), verts(:,2), verts(:,3));
So I'm looking for a better approach at illustrating this 4D problem. Any comments or suggestions are much appreciated.
Thanks!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!