フィルターのクリア

Interpolate Data associated to cartesian meshgrid to all direction (like polar interpolation)

6 ビュー (過去 30 日間)
so i have data of pressure in 1 direction only, since this is just a point source i can assure that the distribution in all direction are the same. so i would like to kind of sweep these value to all direction, the ilustration is given as following
i know how to do this if i use polar coordinate as the meshgrid and then uses pol2chart to convert to cartesian coordinate, but for my particular purpose i need the meshgrid is in cartesian and i dont know how to do this.
hope someone can helps

採用された回答

Stephen23
Stephen23 2022 年 4 月 4 日
Interpolating in 1D to:
  • give the shape formed by rotation around X=Y=0
  • correctly return NaN for values outside the data domain.
R = 0:20:10000;
P = 5000./R.^0.15;
plot(R,P)
[Xq,Yq] = meshgrid(-10000:20:10000);
Rq = sqrt(Xq.^2+Yq.^2);
Pq = interp1(R,P,Rq(:));
Pq = reshape(Pq,size(Rq));
surf(Xq,Yq,Pq,'EdgeColor','none')
  1 件のコメント
Mahardika Firjatullah
Mahardika Firjatullah 2022 年 4 月 5 日
Thank you so much you are awesome
how you be able to do that in a short time, while i spend all day to figure this out and still failed.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by