Borrar filtros
Borrar filtros

Plotting 3D for three columns of data

13 visualizaciones (últimos 30 días)
N/A
N/A el 3 de Feb. de 2020
Respondida: Akira Agata el 4 de Feb. de 2020
I want to do a 3D plot based on 3 columns of data (X,Y and Z) . X column show positions, y column show speed and z column show emissions. So the result will shows emissions as colors on x(position)-y(speed) axis. Now I have this in 3D but I want a surface output with colours as emission value.
hh.jpg

Respuesta aceptada

Akira Agata
Akira Agata el 4 de Feb. de 2020
How about using scatteredInterpolant function?
The following is an example:
D = xlsread('LMS.xlsx');
F = scatteredInterpolant(D(:,1),D(:,2),D(:,3));
[xq,yq] = meshgrid(linspace(0,3,20),linspace(0,45,20));
zq = F(xq,yq);
figure
surf(xq,yq,zq)
hold on
scatter3(D(:,1),D(:,2),D(:,3),'r','filled')
colorbar
surf.png

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by