フィルターのクリア

Exporting Interpolation of 2D data in 2D format

4 ビュー (過去 30 日間)
Kabir Shariff
Kabir Shariff 2022 年 10 月 26 日
回答済み: Kabir Shariff 2022 年 10 月 26 日
Hello,
I have a 2D unstructured mesh data from numerical result. I would like to interpolate the data in matlab and export the interpolated data to be post process with gnuplot. My initial data attached herewith is in the form of x, y, U. But the interpolated data data is in form of mesh mxn.
How can I convert the interpolated data into the initial format of x,y,U?
I attached herewith the data;
data = importdata('2Ddata.txt');
x = data(:,1);
y = data(:,2);
v = data(:,3);
[xx,yy] = meshgrid(min(x):0.1:max(x),min(y):0.1:max(y));
vq = griddata(x,y,v,xx,yy);
Thanks

採用された回答

Kabir Shariff
Kabir Shariff 2022 年 10 月 26 日
Hello,
I found the solution to the problem
to recontruct the griddata into table, use
out = [xx(:) yy(:) zz(:) vq(:)];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by