Dear sir
Thank your for your great PAC codes for analyzing phase amplitude coupling.
I have a question:
we observe the following error when we consider the frequency lower than 6 Hz in the Calc_MI function.
Could you please help us?
Error using filter_with_correction (line 51)
Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher cutoff
frequency or a different type/order of filter.
Error in filter_with_correction (line 51)
error('Calculated filter coefficients have poles on or outside the unit circle and will not be stable. Try a higher
cutoff frequency or a different type/order of filter.');
Error in ft_preproc_bandpassfilter (line 286)
filt = filter_with_correction(B,A,dat,dir,usefftfilt);
Error in preproc (line 324)
if strcmp(cfg.bpfilter, 'yes'), dat = ft_preproc_bandpassfilter(dat, fsample, cfg.bpfreq, cfg.bpfiltord,
cfg.bpfilttype, cfg.bpfiltdir, cfg.bpinstabilityfix, cfg.bpfiltdf, cfg.bpfiltwintype, cfg.bpfiltdev, cfg.plotfiltresp,
cfg.usefftfilt); end
Error in ft_preprocessing (line 358)
[dataout.trial{i}, dataout.label, dataout.time{i}, cfg] = preproc(data.trial{i}, data.label, data.time{i}, cfg,
begpadding, endpadding);
Error in calc_MI (line 70)
[virtsens_phase] = ft_preprocessing(cfg, virtsens);
Error in simulated_PAC_analysis1 (line 90)
tort_PAC = calc_MI(VE_PAC,[0.001 10],[5 20],[30 70],'no','no','tort');
All the best
Reza