Borrar filtros
Borrar filtros

I wanted to plot a surfc plot of the attached data. It has x,y and z data.The data corresponds to a 2D scan of a circular cross section.

1 visualización (últimos 30 días)
I wanted to plot a surfc plot of the attached data. It has x,y and z data.The data corresponds to a 2D scan of a circular cross section (density measurements at each (x=-65 to +65mm,y=-65 to +65mm) location). Note that there is an assymetry in the data points available at each location. Eg. at x=0mm,y has 27 data points from -65 to +65.But at x= 65mm only 9 y datas are available from +15 mm to -25 mm due to the experimental limitation. How can I plot surfc or contourf plot for this data. ? This can be very easily done in origin, but how to do in matlab ?

Respuesta aceptada

darova
darova el 29 de Sept. de 2019
Just use griddata()
xq = linspace( min(x),max(x),30 );
yq = linspace( min(y),max(y),30 );
[X,Y] = meshgrid(xq,yq);
Z = griddata(x,y,z,X,Y);
surf(X,Y,Z)

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by