How to export data from scatteredInterpolant to a XYZ text file?

1 view (last 30 days)
Hello everyone. I have three 2000×2000 matrices from scatteredInterpolant, X, Y and Z (Z=f(X,Y)). With these three matrices I created one surface, and than I got more three matrices to create another one. My intention is to compare visually (overlap) these two different surfaces. We know that we have some color problems when trying to plot several surfaces at the same plot, so I have decided to export the data to create and compare these surfaces in another software (another one faster for this kind of task). But for that I need the matrices as XYZ tab delimited column file (.txt) and I really don't know how to generate this kind of file from those matrices. Is it possible? Thank you very much.

Accepted Answer

John D'Errico
John D'Errico on 18 Aug 2016
out = [X(:),Y(:),Z(:)];
save filename out -ascii
WTP?

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!