plot function in a specific interval while the other interval function is equal to zero
古いコメントを表示
how can i plot the following fucntion
g(t)= t^2+ 2*t+3 , 5 < t < 20
g(t)= 0 , t < 5 & t > 20
回答 (1 件)
madhan ravi
2019 年 3 月 26 日
See if this helps to understand how to solve your homework:
t=1:.1:10;
g=t.^2.*(t>=1 & t<5) + t.*(t>=5 & t<=10);
plot(t,g)
5 件のコメント
madhan ravi
2019 年 3 月 26 日
Hint: One of your time interval should use "|" instead of "&".
Mohamed karam
2019 年 3 月 26 日
madhan ravi
2019 年 3 月 26 日
Show what you have tried.
Mohamed karam
2019 年 3 月 26 日
Mohamed karam
2019 年 3 月 26 日
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!