x(t) = 2*u((-t/4)+2), |t|<=10

3 次查看(过去 30 天)
milton
milton 2020-11-5
I want to plot the above equation in matlab but i dont know how to plot please help or provide me code

采纳的回答

Ameer Hamza
Ameer Hamza 2020-11-5
编辑:Ameer Hamza 2020-11-5
I guess u is the unit-step function. You can try this if you have symbolic toolbox
syms t
x = 2*heaviside(-t/4+2);
fplot(x, [-10 10]);
Without symbolic toolbox
u = @(x) 1*(x>=0);
t = -10:0.01:10;
x = 2*u(-t/4+2);
plot(t, x)
  2 个评论
milton
milton 2020-11-5
thakns a lot! it worked perfectly!
Ameer Hamza
Ameer Hamza 2020-11-5
I am glad to be of help!

请先登录,再进行评论。

更多回答(1 个)

Ibrahem Ahmed
Ibrahem Ahmed 2021-3-16
u = @(x) 1*(x>=0); t = -10:0.01:10; x = 2*u(-t/4+2); plot(t, x)

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by