How to make a Contour Map
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am still quite new to MATLAB, and I need to produce a contour map from a data set of x,y,z which represent longitude, latitude, and elevation of a surface.
I have not been able to use the contour function to get an image which makes sense. MATLAB tells me that my Z matrix must be 2x2 at least, which in the case of my data makes no sense.
The data is as follows:
X=[-0.343,-0.338,-0.333,-0.331,-0.3275,-0.3215,-0.315,-0.305,-0.293,-0.327,-0.3225,-0.3175,-0.315]';
Y=[0.461,0.463,0.463,0.4665,0.4675,0.4725,0.4725,0.4775,0.4815,0.4825,0.48,0.4775,0.4725]';
Z=[630,535,520,610,630,610,710,620,690,630,610,610,710]';
Any help with making a contour map would be greatly appreciated.
0 件のコメント
回答 (1 件)
John D'Errico
2016 年 11 月 14 日
You have scattered data. Contour requires GRIDDED data.
Download tricontour from the file exchange. I recall there are two versions up there. Either will be fine.
0 件のコメント
参考
カテゴリ
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!