Contour(X,Y,Z), grid contour with regard to probability or distance costs
12 ビュー (過去 30 日間)
古いコメントを表示
Hi! Can contour work to create grid contour? My data is like this. 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 the matrix of second picture. But the generated graph only shows an average contour. I wanna try to generate one like the third graph. Did i try the right function or there is other more suitable one than contour()? Thank you!



if true
%code
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);
end
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
if true
% code
contourf(A(:,1),A(:,2),A(:,3));
pcolor(A(:,1),A(:,2),A(:,3));
end
0 件のコメント
回答 (1 件)
Mike Garrity
2016 年 1 月 21 日
2 件のコメント
Mike Garrity
2016 年 1 月 21 日
I see. I wasn't sure whether you were after the gridding part or the display part.
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!