not able to subtract two discrete signals
6 views (last 30 days)
Show older comments
irtaza anwar
on 12 Apr 2015
Commented: Star Strider
on 12 Apr 2015
close all
clear all
n=-2:2
x(n~=0)=0
x(n==0)=1
subplot(3,1,1)
stem(n,x)
w(n~=2)=0
w(n==2)=1
subplot(3,1,2)
stem(n,w)
y=x-n
subplot(3,1,3)
stem(n,y)
0 Comments
Accepted Answer
Star Strider
on 12 Apr 2015
I’m not certain that I understand what you are doing, but perhaps changing the ‘y’ assignment to:
y=x-w;
is what you want.
4 Comments
More Answers (0)
See Also
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!