Plot a smooth graph from excel data

12 visualizaciones (últimos 30 días)
sannatlegend
sannatlegend el 6 de En. de 2017
Editada: sannatlegend el 8 de En. de 2017
Hi,
I have to import three columns from excel, each column having over 50,000 data points. And I have to plot a three-dimensional plot. Can someone please help me by guiding me on which commands to use so that I can plot a smooth curve (like the attached diagram) from the excel data?

Respuestas (3)

Adam
Adam el 6 de En. de 2017
doc xlsread
doc surf
  1 comentario
sannatlegend
sannatlegend el 7 de En. de 2017
Adam, thank you for your reply. I have tried your commands, but still have some trouble. This was what I did to plot the graphs before your help.
figure;
tri1 = delaunay(shearexponent,temperature);
surf(tri1,shearexponent,temperature,windspeed);
xlabel('Wind Shear Exponent');
ylabel('Temperature (deg. Celsius)');
zlabel('Wind Speed (m/s)');

Iniciar sesión para comentar.


Star Strider
Star Strider el 7 de En. de 2017
If you have three columns and the independent variables (coordinates) are not gridded, you cannot plot them in a surf or mesh plot without interpolating them to a grid first. (see the documentation for the scatteredInterpolant class for details.)
One easy way to see if they are gridded is to use stem3 to plot them. The advantage of stem3 over the others (specifically scatter3 or plot3) is that stem3 shows you where the independent variable coordinates are located for each dependent variable. If they look gridded, you can then use the reshape function to produce the gridded coordinates that the surf and mesh functions require.

sannatlegend
sannatlegend el 8 de En. de 2017
Editada: sannatlegend el 8 de En. de 2017
Star Strider, thank you for your help. But I am still having some trouble understanding your statement.
The data points were measured by a LIDAR system, and I want to plot the 3D graph to see the dependence of shear exponent with wind speed and temperature.
What exactly do you mean by gridded? That one variable is a function on the other two? As in if I have two variables x and y, z = f(x,y)?
Apologies for any inconvenience, but I'm new to Matlab.

Categorías

Más información sobre 2-D and 3-D 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