# turn table to contour

22 ビュー (過去 30 日間)
Keren Grinberg 2022 年 3 月 9 日
コメント済み: DGM 2023 年 1 月 21 日
hello, i have teble of data:
h=[100 100 200 200 300 300 400 400]';
v=[250 260 250 260 250 260 250 260]';
T=[25 26 35 32 35 38 38 25]';
table(h,v,T)
ans =
8×3 table
h v T
___ ___ __
100 250 25
100 260 26
200 250 35
200 260 32
300 250 35
300 260 38
400 250 38
400 260 25
the valus from some experiment and i want to show them in plot. (eg - for hight of 100 m combined with 2 velocity i have to temprature 25 and 56)
i think to do contour but i dont now what i need to insert to "z" that i want to represent the temperature.
my goal is somthing like that:
when every color represent temperature -
green 25
black 38..........
##### 3 件のコメント表示 2 件の古いコメント非表示 2 件の古いコメント
DGM 2023 年 1 月 21 日
If you're trying to get efficiency data from a Simulink model, why are you asking in old thread about using contour plots? When you hide your questions where they don't belong, you can obviously expect that few people will ever see them.
At the top of the page, where it says Ask, you can start a new question. Include a description of your model as you've built it. That way, people will see your question, and they'll have enough information to give a more helpful answer.

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

### 回答 (2 件)

Benjamin Thompson 2022 年 3 月 9 日
If you type "doc contour" in MATLAB you will see many ways to use it:
You probably want something like contour(h, v, T) from your table, and then use the levels parameter if you want temperature contours for specific temperature values. You should post your data to help the community provide better answers if you have more questions after trying this out.
##### 0 件のコメント表示 -1 件の古いコメント非表示 -1 件の古いコメント

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

Peter Perkins 2022 年 3 月 9 日
I'm not sure contour is the function you want to make the plot you showed. contourf, maybe? But maybe image instead.
In any case, contour does not currently accept a table as input. There are lots of reasons to put data into a table, but to call contour, you'll need contour(t.h,t.v,t.T), where t is your table.

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

### カテゴリ

Find more on Contour Plots in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by