[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unable to use findpeaks : Error:subscript indices must be either positiv
From: |
debatri |
Subject: |
Unable to use findpeaks : Error:subscript indices must be either positive integers or logicals |
Date: |
Mon, 17 Jun 2013 01:52:30 -0700 (PDT) |
Hi,
I am a new octave user. I tried to use "findpeaks" in the following block of
code and is getting Error: subscript indices must be either positive
integers or logicals.
t=[1:400]';
f1=500;
f2=4000;
fs=24000;
ts=1/fs;
y1=sin(2*pi*f1/fs*t);
y2=sin(2*pi*f2/fs*t);
data1=2+(0.2*y1+y2);
[pks idx] = findpeaks(data1);
Please help....
--
View this message in context:
http://octave.1599824.n4.nabble.com/Unable-to-use-findpeaks-Error-subscript-indices-must-be-either-positive-integers-or-logicals-tp4654348.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Unable to use findpeaks : Error:subscript indices must be either positive integers or logicals,
debatri <=