plotting discrete time signals
25 次查看(过去 30 天)
显示 更早的评论
I'm trying to plot a discrete time signal with a step function from -5 to 5 I am trying to use the heaviside() function but keep getting errors. Can anyone tell me why this is invalid matlab syntax?
n = [-5 -4 -3 -2 -1 0 1 2 3 4 5];
f_one = 2*(0.5)^.n * heaviside(n.+2)
0 个评论
采纳的回答
Azzi Abdelmalek
2013-9-11
编辑:Azzi Abdelmalek
2013-9-11
% You have so
n = [-5 -4 -3 -2 -1 0 1 2 3 4 5];
f_one = 2*0.5.^n.* heaviside(n+2)
stem(n,f_one)
% The operator .+ does not exist in Matlab
0 个评论
更多回答(2 个)
aswathy subash
2019-5-1
matlab program for to sketch magnitude and phase spectrum of discrete time system H(e^jw)=(1-e^(-3jw))/3(1-e(-jw) )
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Install Products 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!