Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Using Griddata Plotting with plot3

1 Ansicht (letzte 30 Tage)
Alexander Quinto
Alexander Quinto am 11 Dez. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hey, I am trying to tnterpolate 3-D scattered data using griddata, how would I accomplish it? The picture attached is the data plotted using the 'plot3' function. Thank you!
close all;
A1 = csvread('Circle6inch copy');
A2 = csvread('Circle12inchCopy');
A3 = csvread('Circle18inchCopy');
r = [6,12,18];
x = [cos(A1(:,1))*r(1); cos(A2(:,1))*r(2); cos(A3(:,1))*r(3)] ;
y = [sin(A1(:,1))*r(1); sin(A2(:,1))*r(2); sin(A3(:,1))*r(3)] ;
a = [A1(:,2); A2(:,2); A3(:,2)];
z = meshgrid(x,y);
n = length(x);
m = length(y);
for i = 1: n
for j = 1 : m
z(i,j)= a(j);
end
end
plot3(x,y,z);

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by