suppress findpeaks warnings in MATLAB Signal Processing Toolbox -
i use function findpeaks matlab's signal processing toolbox. everytime function not find peaks receive warning:
warning: no peaks found. > in findpeaks @ 83
now have handle cases anyway , therefore check if vector returned findpeaks
empty. suppress warnings, because don't want command window cluttered up.
first identify warning id:
findpeaks([1 1 1 1 ]); [msg id] = lastwarn;
then switch off warning:
warning('off',id)
Comments
Post a Comment