File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 2525
2626%% Configuring an instrument buffer to acquire data
2727instObj = slrealtime .Instrument ;
28- instObj .addSignal(' spf_sig ' );
28+ instObj .addSignal(' spf_sig_500Hz ' );
2929instObj .addSignal(' osc' ,' BusElement' ,' alpha.ip' );
3030instObj.BufferData = true ;
3131
4242
4343% Extract data and downsample fast signal
4444osc_alpha_ipData = sigData{1 }.data;
45- spf_sigData = downsample( squeeze(sigData{2 }.data)' , 2 ) ;
45+ spf_sigData = squeeze(sigData{2 }.data)' ;
4646
4747% Compute sample frequency
4848fs = 1 / mean(diff(sigData{1 }.time));
4949
5050% Compensante offset in instantaneous predicted phase
5151numSamples = 3 ;
5252osc_alpha_ipData = osc_alpha_ipData(1 + numSamples : end ,: );
53-
54- % Use same number of samples from SPF
55- if size(osc_alpha_ipData ,1 ) > size(spf_sigData ,1 )
56- osc_alpha_ipData = osc_alpha_ipData(1 : size(spf_sigData ,1 ),: );
57- else
58- spf_sigData = spf_sigData(1 : size(osc_alpha_ipData ,1 ),: );
59- end
53+ spf_sigData = spf_sigData(1 : size(osc_alpha_ipData ,1 ),: );
6054
6155
6256%% Phase error using standard non-causal methods
You can’t perform that action at this time.
0 commit comments