Effacer les filtres
Effacer les filtres

Interpolation for 3D scattered data

3 vues (au cours des 30 derniers jours)
Az
Az le 25 Avr 2017
Commenté : Heru Leonardo le 22 Avr 2020
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

Réponses (2)

KSSV
KSSV le 25 Avr 2017
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 le 25 Avr 2017
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 commentaire
Heru Leonardo
Heru Leonardo le 22 Avr 2020
how to plot this?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by