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

1 次查看(过去 30 天)
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.

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by