[Top][All Lists]

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

Re: Running octave script on interrupt

From: Francesco Potortì
Subject: Re: Running octave script on interrupt
Date: Sat, 04 Oct 2014 13:44:35 +0200

>while (k--)
>     next+=.01
>     while(time()<next); endwhile
>     a(k)=time
>which on my system seems to run at  100Hz +-  1Hz judging from 
>hist(diff(a),1000). You seem to need to run the loop forever, so just 
>replace the outer loop with while(true).

The code you wrote should have a null long-term frequency error.  What
you measured is the jitter, which apparently amounts at 1%.

If the original poster needs lower jitter, a loop like this is not
enough, and one should use Linux's real-time features.

Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:

reply via email to

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