I deal with mono-channel breathing signals sampled at 30[Hz] which are non-linear and non-stationary.
My goal is to classify the signals according to common breathing patterns
Trend remotion is necessary for cluster analysis but quite challenging. In fact, quasi-periodic patterns that span a number of
consecutive breathing cycles should not be naively removed as they carry a lot of useful information. 
In advance of applying any trend removing technique, I have to extract the main period and save it.
I thought it would be an easy task through functions "spec" and  "specprop". But I cannot get them to work for me.
Here is my simple exercise:

> length(amp)
[1] 3885
> amp.sp <- spec(amp,f=0.033)
> specprop(amp.sp,f=0.033,str=TRUE,plot=1)
Error in specprop(amp.sp, f = 0.033, str = TRUE, plot = 1) : 
  Frequency resolution is to high (<0.5 hz)
> specprop(amp.sp,f=0.033,str=TRUE)
Error in specprop(amp.sp, f = 0.033, str = TRUE) : 
  Frequency resolution is to high (<0.5 hz)

I cannot get the meaning of the message error unless there is a constraint on the frequency resolution deal with
by these functions ... in this case the error message should read "... Frequency resolution is TOO  high (<0.5 hz)"
Even so, I am still puzzled beause the default window is 512 wide ==> 1/512 = 0.001953125
The signal length is 3885 ==> 1/3885 = 0.0002574003

Your help is very welcome.
Thank you in advance.
Kind regards,
Maura 



tutti i telefonini TIM!





tutti i telefonini TIM!


	[[alternative HTML version deleted]]


