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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Prince Alex
am 29 Sep. 2019
Kommentiert: Prince Alex
am 30 Sep. 2019
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 ?
0 Kommentare
Akzeptierte Antwort
darova
am 29 Sep. 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)
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!