This solution is outdated. To rescore this solution, sign in.
-
3 Comments
Brian Butler
on 16 Nov 2015
This solution uses filter from the Signal Processing Toolbox.
Peng Liu
on 18 Nov 2015
Yes, it uses filter, but filter is indeed not a toolbox function, but a built-in function. You can fix the error by changing f=y(n-2) to f = y(n)
Jan Orwat
on 18 Nov 2015
... and then change first input of filter to [1,-1] and remove +1 from the end of the line.
Suggested Problems
-
2452 Solvers
-
10375 Solvers
-
1479 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
770 Solvers
-
587 Solvers
More from this Author4
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!