Contour(X,Y,Z), grid contour with regard to probability or distance costs
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Mike Garrity
el 21 de En. de 2016
2 comentarios
Mike Garrity
el 21 de En. de 2016
I see. I wasn't sure whether you were after the gridding part or the display part.
Ver también
Categorías
Más información sobre Contour Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!