Contour plotting with x,y,z data
이전 댓글 표시
Hello, I am in need of plotting contour of the data I have. I have values for x,y,z axis. Now I am not having any relation between these axes.
How can I plot contour of it? I checked Matlab help and everywhere they have mentioned a relation z axis with x and Y which I don't have!
댓글 수: 4
Thomas Koelen
2015년 5월 6일
I'm not sure what you mean, if there is no relation between the axes why would you want to plot them?
Can you show us some of your data?
Thomas
adi kul
2015년 5월 6일
Walter Roberson
2015년 5월 6일
Do you mean that you have scattered input? Vectors of X, Y, and Z rather than rectangular grids?
adi kul
2015년 5월 6일
답변 (1개)
Walter Roberson
2015년 5월 6일
0 개 추천
댓글 수: 2
adi kul
2015년 5월 22일
Bjorn Gustavsson
2015년 5월 22일
편집: Bjorn Gustavsson
2015년 5월 22일
Yes useful. Download function in link, then try this example:
x = randn(312,1);
y = randn(312,1);
tri = delaunay(x,y);
z = exp(-x.^2/0.5^2-abs(y.^3)/0.3^3);
[c,h] = tricontour(tri,x,y,z,7);
That is how matlab can do this job.
If your data are significantly different, for example way fewer points or some special geometry that makes other solutions better, we cant tell without more information.
HTH
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!