plot 5 indipendent vectors in 3D plot
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Francesco Porretta
am 4 Sep. 2021
Beantwortet: darova
am 8 Sep. 2021
I have 5 vectors of related elements, in the sense that the first element of vector A is connected to the first elements of vectors B, C, D, E, the second with the seconds, and so on: they represents the x, y, z, phi and delta coordinates of points.
I'm searching for a way to plot this vectors as surface plot or scatterplot, but I really don't know if it is possible to do.
Someone can help??
2 Kommentare
darova
am 5 Sep. 2021
Please explain more: how the vectors are connected? Can you attach some picture or data?
Akzeptierte Antwort
darova
am 8 Sep. 2021
Delta is represented by color.
x = 20*rand(100,1)-10; % surface coordinates
y = 20*rand(100,1)-10;
r = hypot(x,y);
z = -r.^2/10;
delta = sin(r); % surface color (characteristic)
xx = linspace(min(x),max(x),50);
yy = linspace(min(y),max(y),50);
[X,Y] = meshgrid(xx,yy); % create a mesh
Z = griddata(x,y,z,X,Y); % interpolate Z coord
D = griddata(x,y,delta,X,Y);% interpolate delta
scatter3(x,y,z,25,delta,'filled')
surface(X,Y,Z,D,'facecolor','interp')
axis equal
colorbar
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!