You have a couple different ways to do this. I've listed two below to try and help.
Both ways I did it start with the following.
%--------------------------------------------------------------------------------------------------------------------------%
% Predeclarations %
data = readtable('data.csv'); %read in csv file as a table. xlsread is being/has been phased out.
data2 = table2array(data); %gets csv file into an array for easy checking.
%--------------------------------------------------------------------------------------------------------------------------%
%method 1 -- for loops
%this method works because data2 is an array of set size.
% Advantages: Easy to debug, and results are quite viewable.
% Disadvantages: If you are looking at 10k data points, this can become memory intensive.
data_check_array = []; %empty array to stack in checks.
[a,b] = size(data2);
for i = 1:length(data2) %handles each row
stack = [];
for j = 2:b %handles each column ignoring the time value.
if (data2(i,j) >= 1.2) && (data2(i,j) <= 2.2) %this means neither true or false
stack = [stack,0.5];
elseif (data2(i,j) < 1.2) %means false
stack = [stack,0];
else %means true
stack = [stack,1];
end
end %end j for loop
data_check_array = [data_check_array;stack];
end %end i for loop
%--------------------------------------------------------------------------------------------------------------------------%
% method 2 -- Hide and Seek
%This method works because you are only seeking specific numerical values in the table
% Advantages: This method is quick on computations and leads to solid end results
% Disadvantages: This method is much harder to debug.
true_indx = find(data2(:,2:end) > 2.2);
false_indx = find(data2(:,2:end) < 1.2);
[a,b] = size(data2);
check_array(1:a,2:b) = 0.5; %assume all values are not checked to not have to have a null index.
check_array(true_indx) = 1;
check_array(false_indx) = 0;
check_array(:,1) = data2(:,1);
%--------------------------------------------------------------------------------------------------------------------------%
I sadly don't have the capabilities to test this code, but I am confident the logic is good. Hope it helps!