turn table to contour

9 次查看(过去 30 天)
Keren Grinberg
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 个评论
Kundan
Kundan 2023-1-21
Hello dear, please guide me, how to get efficiency map of motor in simulink model. I am unable to find the effiecency in simulink. Plz guidd me
DGM
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
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.

Peter Perkins
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.

类别

Help CenterFile Exchange 中查找有关 Contour Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by