フィルターのクリア

Interpolation for 3D scattered data

3 ビュー (過去 30 日間)
Az
Az 2017 年 4 月 25 日
コメント済み: Heru Leonardo 2020 年 4 月 22 日
a= [0 5 9 20 30 35] ; % cordinbates X
b= [0 4 27 31 35] ; % cordinbates Y
c= [1 5 6 8 10 20 ] ; % cordinbates Z
d= [40 40.1 40.2 40.4 40.1 40.1] ; % Temperature Values
[x,y,z] = meshgrid(a,b,c);
v = interp3(a,b,c,d,x,y,z);
does not work I need v to be interpolated for every 3D point (x,y,z). How can I perform? Thanks in advance

回答 (2 件)

KSSV
KSSV 2017 年 4 月 25 日
You have to make d a 3d matrix of size equal to x.
a= [0 5 9 20 30 35] ; % cordinbates X
b= [0 4 27 31 35] ; % cordinbates Y
c= [1 5 6 8 10 20 ] ; % cordinbates Z
d= [40 40.1 40.2 40.4 40.1 40.1] ; % Temperature Values
[x,y,z] = meshgrid(a,b,c);
d1 = repmat(d,size(x,1),1) ;
d2 = zeros(size(x)) ;
for i = 1:size(x,3)
d2(:,:,i) = d1 ;
end
v = interp3(a,b,c,d2,x,y,z);

Andrei Bobrov
Andrei Bobrov 2017 年 4 月 25 日
a= [0 5 9 20 30 35] ; % cordinbates X
b= [0 4 10 27 31 35] ; % cordinbates Y I'm fixed
c= [1 5 6 8 10 20 ] ; % cordinbates Z
d= [40 40.1 40.2 40.4 40.1 40.1] ; % Temperature Values
F = scatteredInterpolant(a(:),b(:),c(:),d(:));
[x,y,z] = meshgrid(a,b,c);
v = F(x,y,z);
  1 件のコメント
Heru Leonardo
Heru Leonardo 2020 年 4 月 22 日
how to plot this?

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by