findpeaks doesn't work with a different startup folder
古いコメントを表示
Hello I'm using Matlab 2017a on macOS 10.12.6. I wanted to use findpeaks function so I clean installed Matlab together with the Signal Processing Toolbox. Then I checked the examples for findpeaks function in the documentation and it works fine. But the moment I use startup.m file to start the Matlab session from another folder, the same example for findpeaks doesn't work and the use of command findpeaks(data) returns an empty matrix. Does anyone has any idea about what is this problem and how could this be fixed?
3 件のコメント
Adam
2017 年 7 月 27 日
Where is 'data' coming from? Have you used the debugger to look at data before it goes into the findpeaks function?
Naveen
2017 年 7 月 27 日
You can use the Stop on errors option in the breakpoints menu to stop the code when an error occurs (i.e. equivalent to if you knew there would be an error and on what line and had added a breakpoint yourself), but not for something like this where it is just a case of you shadowing a builtin function (or not when your path changes).
When naming your own functions though you should get into the habit of calling
which myChosenFunctionName
on the command line to check if you are about to clash with a builtin function (where 'myChosenFunctionName' should obviously be replaced by whatever you are planning to name your function)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Correlation and Convolution についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!