how to right math functions

1 回表示 (過去 30 日間)
Abdulelah AlQahtani
Abdulelah AlQahtani 2023 年 5 月 8 日
回答済み: Sam Chak 2023 年 5 月 8 日
how can I define u(t) for the domain of t. To put in in M-file
  2 件のコメント
Torsten
Torsten 2023 年 5 月 8 日
u or u' ?
Abdulelah AlQahtani
Abdulelah AlQahtani 2023 年 5 月 8 日
u'

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

回答 (2 件)

Torsten
Torsten 2023 年 5 月 8 日
編集済み: Torsten 2023 年 5 月 8 日
us = @(t) 4*(t>=0 & t<5) + 2*(t>=5);
t = -10:0.1:10;
plot(t,us(t),'r')

Sam Chak
Sam Chak 2023 年 5 月 8 日
For simplicity, the signal can be defined like this.
t = linspace(-5, 10, 15001);
u1 = 0*(t <= 0);
u2 = 4*(t > 0 & t <= 5);
u3 = 2*(t > 5);
u = u1 + u2 + u3;
plot(t, u), grid on, ylim([-0.5 4.5])

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by