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 次查看(过去 30 天)
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 ?

采纳的回答

darova
darova 2019-9-29
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by