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
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
adi kul 2015 年 5 月 6 日
There is relation from which they have created this data but that relation is not known to me. All I got an excel sheet with 1st row as "Y" axis, 1st column as "X" axis and all the in between rows and columns as Z axis points. And my task is to make a contour of these values!
Walter Roberson
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
adi kul 2015 年 5 月 6 日
Found something similar I am looking for. And the best answer was given for matplotlib python script here: http://stackoverflow.com/questions/15881959/3d-plotting-from-x-y-z-data-excel-or-other-tools
Can I adapt it to Matlab? If yes then how?

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 5 月 6 日

0 投票

See a File Exchange submission for contour plots of scattered data over here

2 件のコメント

adi kul
adi kul 2015 年 5 月 22 日
not useful! uniplot does this job but why can't Matlab??
Bjorn Gustavsson
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 ExchangeContour Plots についてさらに検索

質問済み:

2015 年 5 月 6 日

編集済み:

2015 年 5 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by