help-octave
[Top][All Lists]
Advanced

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

RE: Cumulative Sum Question - Octave Newbie


From: Jason Criss
Subject: RE: Cumulative Sum Question - Octave Newbie
Date: Fri, 7 Jan 2011 00:15:43 -0800

I appreciate all the help.  I think filtering with a low-pass filter and then taking the slope using diff will work for this application.  Does anyone know of an efficient way to transfer data from a Java application into Octave?  I have data stored in an array of doubles that I would like to manipulate with Octave.  I am currently printing the data to a text file and then using csvread to import, but it takes a long time.

> Date: Thu, 6 Jan 2011 18:03:58 -0600
> Subject: Re: Cumulative Sum Question - Octave Newbie
> From: address@hidden
> To: address@hidden
> CC: address@hidden
>
> On 6 January 2011 15:55, Jason Criss <address@hidden> wrote:
> > I have a cumulative sum of monotonic values that is a function of time (I
> > don't have the analytic function, just the points).  For each point along
> > the function, I would like to know the slope.  The issue is that the rate of
> > change is very slow and a little noisy point-to-point so calculating the
> > slope between adjacent points would yield a lot of noise.
>
> How about using a filter to get rid of the noise?
>
> n = 100; x = rand(1,n); [b,a] = butter(3,0.2); plot(1:n,x, 1:n,
> filtfilt(b,a,x))
>
> You can vary the parameters of the Butterworth filter to see how much
> smoothing you want. Once you have a smoother function, apply diff to
> its output in order to get its derivative.
>
> - Jordi G. H.

reply via email to

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