What is the problem in this code plz help
Show older comments
fs=8000;
dt=1/fs;
T=0.5;
t=0:dt:T-dt;
xt=cos(100*pi*t)-2*cos(50*pi*t);
rt=xt+cos(120*pi*t);
pa = bandstop(rt,[230 450],fs);
plot(t,pa);
11 Comments
Dipjyoti Das
on 30 Nov 2018
Edited: Dipjyoti Das
on 30 Nov 2018
KSSV
on 30 Nov 2018
Where is the function bandstop ?
Dipjyoti Das
on 30 Nov 2018
Preethi
on 30 Nov 2018
do you have signal processing toolbox installed?
Dipjyoti Das
on 30 Nov 2018
Dipjyoti Das
on 30 Nov 2018
Preethi
on 30 Nov 2018
try this function
d = designfilt();
Adam
on 30 Nov 2018
You should get used to always using the help that comes with your Matlab rather than the online help (or at least once you have used the online help first then refer to your local help) as the online help is always for the latest version of Matlab so if you are running an older one then you may well end up trying to use functions that don't exist in your version.
Dipjyoti Das
on 30 Nov 2018
The original question was solved: The problem of using the function bandstop, which does not exist in your Matlab version. Now you ak a new question: How to use designfilt to emulate the call of the modern bandstop . Please ask one question per thread only.
Accepted Answer
More Answers (0)
Categories
Find more on Signal Processing Toolbox 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!