Questions about Matlab Filter
Posted: 13 Oct 2016, 07:55
Hello,
my first question is about matlab filter parameter definitions.
In http://www.bci2000.org/wiki/index.php/T ... Definition
there is this example for dataTypes as integer and float
[ 'Visualize float Passbandlow= 8 30 0 % % // Bandpass lower frequency in Hz' ] ...
A parameter called Passbandlow will be visualized in "Visualize" window with value 8. So, what if the point of the DefaultValue(30) parameter if we already have Value as default value in the box?
Continuing with this (i am new to matlab), let´s assume i have this code in bci_construct.m:
Now, in bci_preflight.m i want to check that the second value of FirstAnalisisBand (in terms on what would be shown in the configuration box, 12 as default) is less or equal to the first value of SecondAnalisisBand (12 as default). Otherwhise i throw an error.
How would i do it?
I am trying something like this:
if(str2double( (bci_Parameters.SecondAnalisisBand,2)) < str2double(bci_Parameters.FirstAnalisisBand,3))
error( [ ...
'SecondAnalisisBand first value can not be less than FirstAnalisisBand second value' ...
] );
end
But it is not working.
my first question is about matlab filter parameter definitions.
In http://www.bci2000.org/wiki/index.php/T ... Definition
there is this example for dataTypes as integer and float
For example if i put this in bci_construct.m used for matlabsignalprocessing module:Section DataType Name= Value DefaultValue LowRange HighRange // Comment
[ 'Visualize float Passbandlow= 8 30 0 % % // Bandpass lower frequency in Hz' ] ...
A parameter called Passbandlow will be visualized in "Visualize" window with value 8. So, what if the point of the DefaultValue(30) parameter if we already have Value as default value in the box?
Continuing with this (i am new to matlab), let´s assume i have this code in bci_construct.m:
Code: Select all
parameters = { ...
[ 'Visualize float Passbandlow= 8 8 0 % % // Bandpass lower frequency in Hz' ] ...
[ 'Visualize float Passbandhigh= 30 30 0 % % // Bandpass higher frequency in Hz' ] ...
[ 'Visualize list FirstAnalisisBand= 2 8 12 0 % % // First band range to analyse in Hz' ] ...
[ 'Visualize list SecondAnalisisBand= 2 12 20 0 % % // Second band range to analyse in Hz' ] ...
[ 'Visualize list ThirdAnalisisBand= 2 20 30 0 % % // Third band range to analyse in Hz' ] ...
};
states = { ...
'VisualizeStates 4 0 0 0' ...
};
How would i do it?
I am trying something like this:
if(str2double( (bci_Parameters.SecondAnalisisBand,2)) < str2double(bci_Parameters.FirstAnalisisBand,3))
error( [ ...
'SecondAnalisisBand first value can not be less than FirstAnalisisBand second value' ...
] );
end
But it is not working.