I want to make a contour of a (37*3) data set. Please help!!!

1 view (last 30 days)
The data set is like this: 575 -25 7 625 -25 7 650 -50 7 675 -25 7 725 -25 7 725 -75 5 750 -50 7 775 -25 7 800 -100 5 825 -25 7 850 -50 7 875 -25 7 875 -75 5 875 -125 5 900 -150 5 925 -25 7 950 -50 7 975 -25 7 1000 -100 5 1025 -25 7 1025 -75 5 1050 -50 7 1075 -25 7 1125 -25 7 1125 -125 5 1150 -50 7 1175 -25 7 1175 -75 5 1200 -100 5 1225 -25 7 1250 -50 7 1275 -25 7 1325 -25 7 1325 -75 5 1350 -50 7 1375 -25 7 1425 -25 7

Answers (1)

Star Strider
Star Strider on 28 Apr 2017
This is probably as close as you can get to doing what you want:
The Code
D = [575 -25 7
625 -25 7
650 -50 7
675 -25 7
725 -25 7
725 -75 5
750 -50 7
775 -25 7
800 -100 5
825 -25 7
850 -50 7
875 -25 7
875 -75 5
875 -125 5
900 -150 5
925 -25 7
950 -50 7
975 -25 7
1000 -100 5
1025 -25 7
1025 -75 5
1050 -50 7
1075 -25 7
1125 -25 7
1125 -125 5
1150 -50 7
1175 -25 7
1175 -75 5
1200 -100 5
1225 -25 7
1250 -50 7
1275 -25 7
1325 -25 7
1325 -75 5
1350 -50 7
1375 -25 7
1425 -25 7];
xv = min(D(:,1)):25:max(D(:,1));
yv = min(D(:,2)):25:max(D(:,2));
[X,Y] = meshgrid(xv, yv);
Zi = griddata(D(:,1), D(:,2), D(:,3), X, Y);
figure(1)
contour(X, Y, Zi)
grid on
Experiment to get the result you want. See the documentation on the functions for details on how to use them.

Categories

Find more on Contour Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!