invalid expression error.

8 ビュー (過去 30 日間)
John
John 2023 年 3 月 10 日
コメント済み: John 2023 年 3 月 10 日
B = 0.02;
a = 0.1;
f = 0.53;
phi = 3*pi/4;
t = -5:0.05:10;
x = B^a*exp (-a*t) .*sin(...2*pi*f*t+phi);
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
xu = x.*(t>O) ;
u = (t>0);
plot(t,x,t,u,t,xu)
ylabel('x (t)')
xlabel('t (s)')
text (O, 1.2, 'Tu(t)')
text (-4,-1.1,'x (t)')
axis ([t( 1)t(end)-1.5 1.5])

採用された回答

Torsten
Torsten 2023 年 3 月 10 日
B = 0.02;
a = 0.1;
f = 0.53;
phi = 3*pi/4;
t = -5:0.05:10;
x = B^a*exp (-a*t) .*sin(...
2*pi*f*t+phi);
xu = x.*(t>0) ;
u = (t>0);
plot(t,x,t,u,t,xu)
ylabel('x (t)')
xlabel('t (s)')
text (0, 1.2, 'Tu(t)')
text (-4,-1.1,'x (t)')
axis ([t(1) t(end) -1.5 1.5])
  1 件のコメント
John
John 2023 年 3 月 10 日
Thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNetworks についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by