Mon 19 Jan 2015 06:12:19 PM UTC, comment #4:
Mike, sorry for the late reply.
cset 56e2f21ec883 fixed the "error: findpeaks: operator -: nonconformant arguments (op1 is 0x1, op2 is 1x0)" when using a column vector with no max or min (ones (6, 1)) for me. The reason is:
but with bsxfun:
The other problem is, if DATA is a row vector despite the help text explicitely says: "DATA is expected to be a single column vector"
I think we should issue an error in this case:
Thank you, Andy
|
Wed 23 Jul 2014 10:44:53 AM UTC, original submission:
When using findpeaks (from the 1.3.0 version of the signal processing toolset) on a data set where there are no peaks, e.g. [1 1 1 1 1 1], then the following error is raised:
'error: findpeaks: operator -: nonconformant arguments (op1 is 0x1, op2 is 1x0)
error: evaluating argument list element number 1
error: called from:
error: findpeaks.m at line 135, column 5'
This may be by design, but perhaps returning empty idx and pks arrays would be more condusive as opposed to having to catch and handle this error to handle the case when no peaks are found. For comparison, the findpeaks function in Matlab returns an empty array on finding no peaks.
|