Can contour work to create grid contour? My data is like the first picture. I want to create graph like
(1) x y are column 1 and column 2 as the grid coordinate
(2) column 3 is the costs "Z". In applications, column 3 is the distance.
I can do this according to a MxN matrix with the average distance of M to N. But the generated graph only shows an average contour. I wanna try to generate more detailed or mesh one like the second graph. Did i try the right function or there is other more suitable one than contour()? Thank you!
Code example:
D0o(3,4) = sum(A34_0o(:,3))/100;
D0o(3,5) = sum(A35_0o(:,3))/100;
D0o(3,6) = sum(A36_0o(:,3))/100;
...
pcolor(D0o);
I now creat a 12x12 martix D0o, and the elements indicates the average distance between M and N. So I use pcolor(D0o) to drwa the graph. But it is not intended actually. Because it cannot display the detailed distance costs or probability as what i want(like the graph link). I was thinking about whether there are functions like
contourf(A(:,1),A(:,2),A(:,3));
pcolor(A(:,1),A(:,2),A(:,3));
Matrix A is the one of first link graph. Some of the data is like this:
A = [
10 12 370
10 12 517
10 12 370
10 12 716
10 12 370
9 12 599
9 12 594
9 12 1285
9 12 588
9 12 588
8 12 986
8 12 1245
8 12 1054
8 12 1161
8 12 987
7 12 864
7 12 1075
7 12 867
7 12 515
7 12 515
6 12 933
6 12 844
6 12 578
6 12 297
6 12 578
5 12 1055
5 12 1376
5 12 1193
5 12 891
5 12 891
4 12 470
4 12 1553
4 12 782
4 12 757
4 12 470
3 12 1543
3 12 1147
3 12 1241
3 12 879
3 12 879]