plot y limit troubles

3 ビュー (過去 30 日間)
Dylan Lawson
Dylan Lawson 2021 年 6 月 13 日
コメント済み: Dylan Lawson 2021 年 6 月 13 日
hi all that can help,
very new to matlab,
i have a function which plots a line and it cant exceed a specific y limit and if it does it stays at that limit.
p = 35*9.5488; %power = kilowatts
w = (0/4.5*(2*pi)/60:1:6000/4.5*(2*pi)/60); %angular velocity = Radians/second
t=p./w;
plot(w, t)
the t (Torque) cant be higher than a certain for example 50
but i want the function if above 50 to produce a flat line at 50.
the graph should look like a flat line to start with then drop off as an exponetial if that also helps.

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 6 月 13 日
plot(w, min(50,t))
  1 件のコメント
Dylan Lawson
Dylan Lawson 2021 年 6 月 13 日
thank you so much

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

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by