Initialization function error (Time scale must > 0)
Posted: Mon Oct 12, 2015 4:16 pm
I am using OpenViBE to display the spectrogram over time of data recorded using an emotive EPOC headset. I wrote this code several months ago and it worked, but now when I come back and try to run it again, I get an error message that I cannot find anywhere on this forum. It reads:
[ERROR] At time 0.000 sec <Box algorithm::(0x00004f68, 0x00005877) aka Corrupted signal> Time scale must be > 0
[WARNING] Box algorithm <Corrupted signal> has been deactivated because initialize() function returned error
[ERROR] At time 0.000 sec <Box algorithm::(0x00005579, 0x00007cff) aka Raw signal> Time scale must be > 0
[WARNING] Box algorithm <Raw signal> has been deactivated because initialize() function returned error
OpenViBE then crashes. It appears to make it all the way through the entire initialization function (shown below) before crashing. I am using Windows 7, and version 1.1.0 of OpenVibe. Any insight would be much appreciated. Thank you.
function box_out = FFT_Initialize(box_in)
% we display the setting values
disp('Box settings are:')
for i=1:size(box_in.settings,2)
fprintf('\t%s : %s\n',box_in.settings(i).name, num2str(box_in.settings(i).value));
end
%determine how many rows box_in.user_data.M should have
plot_range_fmin = box_in.settings(2).value;
plot_range_fmax = box_in.settings(1).value;
box_time=1.0; %duration (in seconds) of each epoch of time (click on "Time based epoching" in xml file to obtain this value)
Fs = 128; % Sampling rate (Hz)
N = box_time*Fs; % length of signal (number of samples)
NFFT = 2^nextpow2(N); % Next power of 2 from length of y
f = Fs/NFFT*[0:NFFT/2-1];
plot_ind=find(f>plot_range_fmin & f<plot_range_fmax); %need this to determine how many rows in box_in.user_data.M
% let's add a user-defined indicator to know if the output header is set
box_in.user_data.is_headerset = false;
% Global variables
box_in.user_data.nb_matrix_processed = 0;
box_in.user_data.M = zeros(length(plot_ind)+1,11); %allocate one more row than we need because of stupid pcolor
numofchan=2;%number of channels we want to observe
for ii=1:numofchan
figure;
end
box_out = box_in;
end
[ERROR] At time 0.000 sec <Box algorithm::(0x00004f68, 0x00005877) aka Corrupted signal> Time scale must be > 0
[WARNING] Box algorithm <Corrupted signal> has been deactivated because initialize() function returned error
[ERROR] At time 0.000 sec <Box algorithm::(0x00005579, 0x00007cff) aka Raw signal> Time scale must be > 0
[WARNING] Box algorithm <Raw signal> has been deactivated because initialize() function returned error
OpenViBE then crashes. It appears to make it all the way through the entire initialization function (shown below) before crashing. I am using Windows 7, and version 1.1.0 of OpenVibe. Any insight would be much appreciated. Thank you.
function box_out = FFT_Initialize(box_in)
% we display the setting values
disp('Box settings are:')
for i=1:size(box_in.settings,2)
fprintf('\t%s : %s\n',box_in.settings(i).name, num2str(box_in.settings(i).value));
end
%determine how many rows box_in.user_data.M should have
plot_range_fmin = box_in.settings(2).value;
plot_range_fmax = box_in.settings(1).value;
box_time=1.0; %duration (in seconds) of each epoch of time (click on "Time based epoching" in xml file to obtain this value)
Fs = 128; % Sampling rate (Hz)
N = box_time*Fs; % length of signal (number of samples)
NFFT = 2^nextpow2(N); % Next power of 2 from length of y
f = Fs/NFFT*[0:NFFT/2-1];
plot_ind=find(f>plot_range_fmin & f<plot_range_fmax); %need this to determine how many rows in box_in.user_data.M
% let's add a user-defined indicator to know if the output header is set
box_in.user_data.is_headerset = false;
% Global variables
box_in.user_data.nb_matrix_processed = 0;
box_in.user_data.M = zeros(length(plot_ind)+1,11); %allocate one more row than we need because of stupid pcolor
numofchan=2;%number of channels we want to observe
for ii=1:numofchan
figure;
end
box_out = box_in;
end