Hi Prathamesh,
It seems that you are trying to plot the stresses based on condition “iff_phi==1”. You want to save those plots and delete the corresponding points from the meshgrid. By “delete the points in meshgrid” phrase, I am assuming that you do not intend to use the same points that resulted in “iff_phi==1” condition for further analysis.
You can use the provided condition to create a logical array. The array can then be used as indices for extracting relevant data points and plotting them.
For example, refer to the following code snippet:
condition = iff_phi==1;
scatter3(sigma2Grid(condition),t12Grid(condition),t23Grid(condition), 'filled');
You can also change the condition to check if “iff_phi” is approximately equal to 1 by introducing a threshold:
threshold = 0.1;
condition = abs(iff_phi - 1) < threshold;
After creating the plot, you can save the data in a “*.mat“ format, or export the 3D figure by referring to the following MATLAB Answer: https://www.mathworks.com/matlabcentral/answers/473586-is-there-a-way-to-export-save-a-matlab-3d-figure-so-that-a-3rd-party-can-view-it-with-the-rotation-e
As for “deleting” the data points in the meshgrid, you can assign them “NaN” values to prevent them from further consideration. For example, you can modify “sigma2Grid” as:
sigma2Grid(condition) = NaN;
You can further use logical indexing to store the data points that fulfilled the mentioned condition for creating the “isosurface” plot.
I hope this helps!