help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data clustering


From: Juan Pablo Carbajal
Subject: Re: Data clustering
Date: Mon, 23 Jun 2014 21:08:53 +0200

On Mon, Jun 23, 2014 at 8:41 PM, Przemek Klosowski
<address@hidden> wrote:
> On 06/23/2014 11:06 AM, CdeMills wrote:
>
> data.data <http://octave.1599824.n4.nabble.com/file/n4664952/data.data>
>
> Any idea on how to automatically cluster such kind of data ?
>
>
> findpeaks(abs(diff(Signal)))
>
> using findpeaks from the signal toolbox, except that it's touchy and works
> on its demo data but throws error on this dataset that actually looks
> promising when plotted:
>
> error: findpeaks: subscript indices must be either positive integers or
> logicals
> error: called from:
> error:   /usr/share/octave/packages/signal-1.2.2/findpeaks.m at line 126,
> column 5
>
Can you update the package? I got
signal *|   1.3.0 | /home/juanpi/.octave/signal-1.3.0
and no errors there.

> Does anyone understand why we're getting this error?
>
> BTW, diff(Signal) has one less datapoint than Signal, so it really should be
> [0; diff(Signal)]. This comes up often, for instance when plotting:
> plot(x,y,x,diff(y)) doesn't work, so I just write plot(x,y,x,[0;diff(y)]).
>
> I suppose one could argue that mathematically, the more correct plot is
>
> plot(x,y,x(1:end-1)+diff(x)/2,diff(y))
>
> but this is such a common calculation that maybe someone can suggest a more
> concise way of writing either the shorter X vector or adding one extra point
> on Y.
This depends on what you want to get. find(abs(diff(Y))>thrsd) gives
you the points before the transition. You solution given the point
after it. So not really a matter of correctness but rather what you
want.


>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]