Clear Filters
Clear Filters

Importing files in bulk chnages table columns to NaNs

26 views (last 30 days)
I have the following code in which I want to replace the column 37 in a table. I want to swap the column of categorical values for a column of numerical values.
% Open file selection dialog and allow multiple selections
[file_list, path_n] = uigetfile('*.csv', 'Select CSV Files', 'Multiselect', 'on');
% Check if any files were selected
if ischar(file_list)
% Convert single file string to cell array
file_list = {file_list};
end
% Initialize a cell array to store the modified tables
modifiedTables = cell(length(file_list), 1);
% Loop through each selected file
for k = 1:length(file_list)
% Construct the full file path
filePath = fullfile(path_n, file_list{k});
% Import the CSV file as a table
T = readtable(filePath);
% Check if the table has at least 37 columns
if width(T) >= 37
% Extract the 'OrderNumber' column (column 37) and convert it to a string array
orderNumberColumn = string(T{:, 37});
% Initialize the new column as a double array with the same size as the original column
newOrderNumberColumn = zeros(size(orderNumberColumn));
% Convert the string values to doubles
for i = 1:length(orderNumberColumn)
numValue = str2double(orderNumberColumn(i));
if isnan(numValue)
% If conversion fails (non-numeric value), set the value to 0
newOrderNumberColumn(i) = 0;
else
% Otherwise, use the numeric value
newOrderNumberColumn(i) = numValue;
end
end
% Update only the 37th column with the new double column
T.(T.Properties.VariableNames{37}) = newOrderNumberColumn;
end
% Store the modified table in the cell array
modifiedTables{k} = T;
end
% Display the number of tables processed
disp(['Number of tables processed: ', num2str(length(modifiedTables))]);
Unfortunately, the other columns (for example column 35, 36,38 and 39) also become affected when importing the csv files in bulk and hence my new modified table now contains NaNs even though I would like to only modify the column 37 (see "modifiedtables").
When I import via the user interface (see "imported_by_hand") or when I use the code below(see "T") that doesnt seem to happen.
T_copy = T;
% Extract the 'OrderNumber' column (column 37) and convert it to a string array
orderNumberColumn = string(T_copy{:, 37});
% Initialize the new column as a double array with the same size as the original column
newOrderNumberColumn = zeros(size(orderNumberColumn));
% Convert the string values to doubles
for i = 1:length(orderNumberColumn)
numValue = str2double(orderNumberColumn(i));
if isnan(numValue)
% If conversion fails (non-numeric value), set the value to 0
newOrderNumberColumn(i) = 0;
else
% Otherwise, use the numeric value
newOrderNumberColumn(i) = numValue;
end
end
% Replace the 37th column with the new double column by creating a new table
% Get the table variable names
varNames = T_copy.Properties.VariableNames;
How can I keep this from happening when I import the data in bulk?
Thanks!

Answers (1)

Stephen23
Stephen23 about 7 hours ago
Edited: Stephen23 about 7 hours ago
Avoid the inner loop:
T = load('T.mat').T
T = 33133x41 table
Date SystemTime RunTime CameraPositionX CameraPositionY CameraPositionZ CameraRotationX CameraRotationY CameraRotationZ CameraRotationW LHType LHGrabbedObject LHPositionX LHPositionY LHPositionZ LHRotationX LHRotationY LHRotationZ LHRotationW RHType RHGrabbedObject RHPositionX RHPositionY RHPositionZ RHRotationX RHRotationY RHRotationZ RHRotationW PupilDiameterLeft PupilDiameterRight GazePositionX GazePositionY GazePositionZ FocusInfo LastRequestedBurger LastRequestedDrink OrderNumber OrderStatus LastEvent ManualRegistering VarName41 __________ __________ _______ _______________ _______________ _______________ _______________ _______________ _______________ _______________ ________ _______________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ _________ _______________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ _________________ __________________ _____________ _____________ _____________ _________ ___________________ __________________ ________________ ___________ _________ _________________ _________ 15-11-2023 NaT 115.8 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28039 1.3604 0.29594 0.52423 0.088768 -0.067117 -0.84427 RightHand null 0.076785 1.417 0.25962 0.57927 -0.093584 0.060118 -0.80751 3.52 3.22 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.84 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28036 1.3603 0.29598 0.52418 0.088865 -0.06694 -0.84431 RightHand null 0.076829 1.417 0.25964 0.57926 -0.093948 0.060058 -0.80748 3.52 3.19 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28035 1.3601 0.29597 0.5239 0.088938 -0.067109 -0.84446 RightHand null 0.076925 1.417 0.25952 0.57946 -0.094704 0.06007 -0.80724 3.52 3.22 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28034 1.36 0.29597 0.52382 0.088891 -0.067402 -0.84449 RightHand null 0.077037 1.4171 0.25949 0.57962 -0.094954 0.060195 -0.8071 3.52 3.22 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.86 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28038 1.3599 0.29594 0.52374 0.088781 -0.067576 -0.84454 RightHand null 0.077072 1.4171 0.2594 0.57976 -0.095229 0.060112 -0.80697 3.53 3.19 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.87 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28029 1.3599 0.29592 0.52365 0.088697 -0.067646 -0.8446 RightHand null 0.077094 1.417 0.25934 0.57995 -0.095401 0.060247 -0.8068 3.53 3.22 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.88 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28026 1.3598 0.29599 0.52374 0.088904 -0.067509 -0.84453 RightHand null 0.077149 1.417 0.25928 0.58001 -0.095044 0.060641 -0.80677 3.56 3.21 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.89 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.2803 1.3598 0.29608 0.52373 0.089089 -0.067429 -0.84452 RightHand null 0.077182 1.4171 0.25925 0.58007 -0.094702 0.060962 -0.80674 3.56 3.19 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.9 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28024 1.3598 0.29599 0.52371 0.089113 -0.067484 -0.84453 RightHand null 0.077223 1.4171 0.25922 0.58002 -0.094394 0.060927 -0.80682 3.56 3.19 0.06 -0.07 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.91 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28024 1.3598 0.29606 0.52364 0.089165 -0.067725 -0.84455 RightHand null 0.0772 1.4171 0.25921 0.57998 -0.094445 0.060253 -0.80689 3.51 3.21 0.03 -0.08 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.92 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28019 1.3595 0.29597 0.52352 0.089106 -0.06791 -0.84462 RightHand null 0.0773 1.4169 0.25921 0.57996 -0.09467 0.05975 -0.80692 3.53 3.24 -0.02 -0.08 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.93 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28008 1.3595 0.29597 0.52339 0.089077 -0.06792 -0.8447 RightHand null 0.077376 1.417 0.25917 0.58005 -0.095062 0.059262 -0.80684 3.48 3.25 -0.05 -0.08 1 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.94 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28008 1.3595 0.29608 0.52317 0.089007 -0.067806 -0.84485 RightHand null 0.077386 1.417 0.25912 0.58008 -0.095141 0.059264 -0.80681 3.53 3.22 -0.06 -0.08 0.99 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.96 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28007 1.3594 0.29613 0.52301 0.088863 -0.067627 -0.84498 RightHand null 0.077434 1.4171 0.25909 0.58007 -0.095219 0.059544 -0.80679 3.42 3.19 -0.05 -0.08 0.99 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.97 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.27989 1.3595 0.29614 0.5228 0.088734 -0.067379 -0.84514 RightHand null 0.077619 1.4172 0.25903 0.57992 -0.095414 0.059866 -0.80685 3.41 3.2 -0.06 -0.09 0.99 null "" "" No current order "" "" "" "" 15-11-2023 NaT 115.98 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.27988 1.3594 0.29622 0.52261 0.088784 -0.067391 -0.84525 RightHand null 0.077741 1.4172 0.25897 0.57993 -0.095369 0.060203 -0.80683 3.39 3.2 -0.06 -0.09 0.99 null "" "" No current order "" "" "" ""
if width(T)>=37
V = str2double(string(T{:,37}));
V(isnan(V)) = 0;
T = convertvars(T,37,'double');
T{:,37} = V
end
T = 33133x41 table
Date SystemTime RunTime CameraPositionX CameraPositionY CameraPositionZ CameraRotationX CameraRotationY CameraRotationZ CameraRotationW LHType LHGrabbedObject LHPositionX LHPositionY LHPositionZ LHRotationX LHRotationY LHRotationZ LHRotationW RHType RHGrabbedObject RHPositionX RHPositionY RHPositionZ RHRotationX RHRotationY RHRotationZ RHRotationW PupilDiameterLeft PupilDiameterRight GazePositionX GazePositionY GazePositionZ FocusInfo LastRequestedBurger LastRequestedDrink OrderNumber OrderStatus LastEvent ManualRegistering VarName41 __________ __________ _______ _______________ _______________ _______________ _______________ _______________ _______________ _______________ ________ _______________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ _________ _______________ ___________ ___________ ___________ ___________ ___________ ___________ ___________ _________________ __________________ _____________ _____________ _____________ _________ ___________________ __________________ ___________ ___________ _________ _________________ _________ 15-11-2023 NaT 115.8 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28039 1.3604 0.29594 0.52423 0.088768 -0.067117 -0.84427 RightHand null 0.076785 1.417 0.25962 0.57927 -0.093584 0.060118 -0.80751 3.52 3.22 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.84 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28036 1.3603 0.29598 0.52418 0.088865 -0.06694 -0.84431 RightHand null 0.076829 1.417 0.25964 0.57926 -0.093948 0.060058 -0.80748 3.52 3.19 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28035 1.3601 0.29597 0.5239 0.088938 -0.067109 -0.84446 RightHand null 0.076925 1.417 0.25952 0.57946 -0.094704 0.06007 -0.80724 3.52 3.22 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28034 1.36 0.29597 0.52382 0.088891 -0.067402 -0.84449 RightHand null 0.077037 1.4171 0.25949 0.57962 -0.094954 0.060195 -0.8071 3.52 3.22 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.86 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28038 1.3599 0.29594 0.52374 0.088781 -0.067576 -0.84454 RightHand null 0.077072 1.4171 0.2594 0.57976 -0.095229 0.060112 -0.80697 3.53 3.19 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.87 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28029 1.3599 0.29592 0.52365 0.088697 -0.067646 -0.8446 RightHand null 0.077094 1.417 0.25934 0.57995 -0.095401 0.060247 -0.8068 3.53 3.22 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.88 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28026 1.3598 0.29599 0.52374 0.088904 -0.067509 -0.84453 RightHand null 0.077149 1.417 0.25928 0.58001 -0.095044 0.060641 -0.80677 3.56 3.21 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.89 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.2803 1.3598 0.29608 0.52373 0.089089 -0.067429 -0.84452 RightHand null 0.077182 1.4171 0.25925 0.58007 -0.094702 0.060962 -0.80674 3.56 3.19 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.9 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28024 1.3598 0.29599 0.52371 0.089113 -0.067484 -0.84453 RightHand null 0.077223 1.4171 0.25922 0.58002 -0.094394 0.060927 -0.80682 3.56 3.19 0.06 -0.07 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.91 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28024 1.3598 0.29606 0.52364 0.089165 -0.067725 -0.84455 RightHand null 0.0772 1.4171 0.25921 0.57998 -0.094445 0.060253 -0.80689 3.51 3.21 0.03 -0.08 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.92 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28019 1.3595 0.29597 0.52352 0.089106 -0.06791 -0.84462 RightHand null 0.0773 1.4169 0.25921 0.57996 -0.09467 0.05975 -0.80692 3.53 3.24 -0.02 -0.08 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.93 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28008 1.3595 0.29597 0.52339 0.089077 -0.06792 -0.8447 RightHand null 0.077376 1.417 0.25917 0.58005 -0.095062 0.059262 -0.80684 3.48 3.25 -0.05 -0.08 1 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.94 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28008 1.3595 0.29608 0.52317 0.089007 -0.067806 -0.84485 RightHand null 0.077386 1.417 0.25912 0.58008 -0.095141 0.059264 -0.80681 3.53 3.22 -0.06 -0.08 0.99 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.96 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.28007 1.3594 0.29613 0.52301 0.088863 -0.067627 -0.84498 RightHand null 0.077434 1.4171 0.25909 0.58007 -0.095219 0.059544 -0.80679 3.42 3.19 -0.05 -0.08 0.99 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.97 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.27989 1.3595 0.29614 0.5228 0.088734 -0.067379 -0.84514 RightHand null 0.077619 1.4172 0.25903 0.57992 -0.095414 0.059866 -0.80685 3.41 3.2 -0.06 -0.09 0.99 null "" "" 0 "" "" "" "" 15-11-2023 NaT 115.98 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 LeftHand null -0.27988 1.3594 0.29622 0.52261 0.088784 -0.067391 -0.84525 RightHand null 0.077741 1.4172 0.25897 0.57993 -0.095369 0.060203 -0.80683 3.39 3.2 -0.06 -0.09 0.99 null "" "" 0 "" "" "" ""
Is the column position reliable? Perhaps you should use the column name and/or the column type.
Note that you might also be able to modify the file import options to import that column directly as numeric.
  2 Comments
lil brain
lil brain about 5 hours ago
And, if you dont mind, how would I apply this code to a cell array of tables for example (see "tablesCellArray")?
I have tried this:
modifiedTablesCellArray = cell(length(tablesCellArray), 1);
% Loop through each table in the original cell array
for k = 1:length(tablesCellArray)
% Get the current table
T = tablesCellArray{k};
% Check if the table has at least 37 columns
if width(T) >= 37
% Convert the 37th column to a string array
orderNumberColumn = string(T{:, 37});
% Convert the string values to doubles and handle non-numeric values
numericColumn = str2double(orderNumberColumn);
numericColumn(isnan(numericColumn)) = 0;
% Update the 37th column in the table with the converted numeric values
T.(T.Properties.VariableNames{37}) = numericColumn;
end
% Store the modified table in the new cell array
modifiedTablesCellArray{k} = T;
end
% Display the number of tables modified
disp(['Number of tables modified: ', num2str(length(modifiedTablesCellArray))]);
However I keep getting the error:
Error using {}
Conversion to cell from double is not possible.
Stephen23
Stephen23 about 2 hours ago
C = load('tablesCellArray.mat').tablesCellArray
C = 2x1 cell array
{15680x40 table} {15605x40 table}
for k = 1:numel(C)
T = C{k};
V = str2double(string(T{:,37}));
V(isnan(V)) = 0;
T.(T.Properties.VariableNames{37}) = V;
C{k} = T;
end
C{:}
ans = 15680x40 table
Date SystemTime RunTime Camera Position X Camera Position Y Camera Position Z Camera Rotation X Camera Rotation Y Camera Rotation Z Camera Rotation W LH Type LH Grabbed Object LH Position X LH Position Y LH Position Z LH Rotation X LH Rotation Y LH Rotation Z LH Rotation W RH Type RH Grabbed Object RH Position X RH Position Y RH Position Z RH Rotation X RH Rotation Y RH Rotation Z RH Rotation W Pupil Diameter Left Pupil Diameter Right Gaze Position X Gaze Position Y Gaze Position Z Focus Info Last Requested Burger Last Requested Drink Order Number Order Status Last Event Manual Registering ______________ ____________ _______ _________________ _________________ _________________ _________________ _________________ _________________ _________________ ____________ _________________ _____________ _____________ _____________ _____________ _____________ _____________ _____________ _____________ _________________ _____________ _____________ _____________ _____________ _____________ _____________ _____________ ___________________ ____________________ _______________ _______________ _______________ __________ _____________________ ____________________ ____________ ____________ __________ __________________ {'15-11-2023'} 11:42:29.079 115.8 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28039 1.3604 0.29594 0.52423 0.088768 -0.067117 -0.84427 {'RightHand'} {'null'} 0.076785 1.417 0.25962 0.57927 -0.093584 0.060118 -0.80751 3.52 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.092 115.84 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28036 1.3603 0.29598 0.52418 0.088865 -0.06694 -0.84431 {'RightHand'} {'null'} 0.076829 1.417 0.25964 0.57926 -0.093948 0.060058 -0.80748 3.52 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.098 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28035 1.3601 0.29597 0.5239 0.088938 -0.067109 -0.84446 {'RightHand'} {'null'} 0.076925 1.417 0.25952 0.57946 -0.094704 0.06007 -0.80724 3.52 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.103 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28034 1.36 0.29597 0.52382 0.088891 -0.067402 -0.84449 {'RightHand'} {'null'} 0.077037 1.4171 0.25949 0.57962 -0.094954 0.060195 -0.8071 3.52 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.107 115.86 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28038 1.3599 0.29594 0.52374 0.088781 -0.067576 -0.84454 {'RightHand'} {'null'} 0.077072 1.4171 0.2594 0.57976 -0.095229 0.060112 -0.80697 3.53 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.117 115.87 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28029 1.3599 0.29592 0.52365 0.088697 -0.067646 -0.8446 {'RightHand'} {'null'} 0.077094 1.417 0.25934 0.57995 -0.095401 0.060247 -0.8068 3.53 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.127 115.88 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28026 1.3598 0.29599 0.52374 0.088904 -0.067509 -0.84453 {'RightHand'} {'null'} 0.077149 1.417 0.25928 0.58001 -0.095044 0.060641 -0.80677 3.56 3.21 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.139 115.89 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.2803 1.3598 0.29608 0.52373 0.089089 -0.067429 -0.84452 {'RightHand'} {'null'} 0.077182 1.4171 0.25925 0.58007 -0.094702 0.060962 -0.80674 3.56 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.149 115.9 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28024 1.3598 0.29599 0.52371 0.089113 -0.067484 -0.84453 {'RightHand'} {'null'} 0.077223 1.4171 0.25922 0.58002 -0.094394 0.060927 -0.80682 3.56 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.161 115.91 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28024 1.3598 0.29606 0.52364 0.089165 -0.067725 -0.84455 {'RightHand'} {'null'} 0.0772 1.4171 0.25921 0.57998 -0.094445 0.060253 -0.80689 3.51 3.21 0.03 -0.08 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.172 115.92 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28019 1.3595 0.29597 0.52352 0.089106 -0.06791 -0.84462 {'RightHand'} {'null'} 0.0773 1.4169 0.25921 0.57996 -0.09467 0.05975 -0.80692 3.53 3.24 -0.02 -0.08 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.183 115.93 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28008 1.3595 0.29597 0.52339 0.089077 -0.06792 -0.8447 {'RightHand'} {'null'} 0.077376 1.417 0.25917 0.58005 -0.095062 0.059262 -0.80684 3.48 3.25 -0.05 -0.08 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.194 115.94 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28008 1.3595 0.29608 0.52317 0.089007 -0.067806 -0.84485 {'RightHand'} {'null'} 0.077386 1.417 0.25912 0.58008 -0.095141 0.059264 -0.80681 3.53 3.22 -0.06 -0.08 0.99 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.205 115.96 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28007 1.3594 0.29613 0.52301 0.088863 -0.067627 -0.84498 {'RightHand'} {'null'} 0.077434 1.4171 0.25909 0.58007 -0.095219 0.059544 -0.80679 3.42 3.19 -0.05 -0.08 0.99 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.217 115.97 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.27989 1.3595 0.29614 0.5228 0.088734 -0.067379 -0.84514 {'RightHand'} {'null'} 0.077619 1.4172 0.25903 0.57992 -0.095414 0.059866 -0.80685 3.41 3.2 -0.06 -0.09 0.99 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.227 115.98 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.27988 1.3594 0.29622 0.52261 0.088784 -0.067391 -0.84525 {'RightHand'} {'null'} 0.077741 1.4172 0.25897 0.57993 -0.095369 0.060203 -0.80683 3.39 3.2 -0.06 -0.09 0.99 {'null'} NaN NaN 0 NaN NaN NaN
ans = 15605x40 table
Date SystemTime RunTime Camera Position X Camera Position Y Camera Position Z Camera Rotation X Camera Rotation Y Camera Rotation Z Camera Rotation W LH Type LH Grabbed Object LH Position X LH Position Y LH Position Z LH Rotation X LH Rotation Y LH Rotation Z LH Rotation W RH Type RH Grabbed Object RH Position X RH Position Y RH Position Z RH Rotation X RH Rotation Y RH Rotation Z RH Rotation W Pupil Diameter Left Pupil Diameter Right Gaze Position X Gaze Position Y Gaze Position Z Focus Info Last Requested Burger Last Requested Drink Order Number Order Status Last Event Manual Registering ______________ ____________ _______ _________________ _________________ _________________ _________________ _________________ _________________ _________________ ____________ _________________ _____________ _____________ _____________ _____________ _____________ _____________ _____________ _____________ _________________ _____________ _____________ _____________ _____________ _____________ _____________ _____________ ___________________ ____________________ _______________ _______________ _______________ __________ _____________________ ____________________ ____________ ____________ __________ __________________ {'15-11-2023'} 11:42:29.079 115.8 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28039 1.3604 0.29594 0.52423 0.088768 -0.067117 -0.84427 {'RightHand'} {'null'} 0.076785 1.417 0.25962 0.57927 -0.093584 0.060118 -0.80751 3.52 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.092 115.84 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28036 1.3603 0.29598 0.52418 0.088865 -0.06694 -0.84431 {'RightHand'} {'null'} 0.076829 1.417 0.25964 0.57926 -0.093948 0.060058 -0.80748 3.52 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.098 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28035 1.3601 0.29597 0.5239 0.088938 -0.067109 -0.84446 {'RightHand'} {'null'} 0.076925 1.417 0.25952 0.57946 -0.094704 0.06007 -0.80724 3.52 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.103 115.85 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28034 1.36 0.29597 0.52382 0.088891 -0.067402 -0.84449 {'RightHand'} {'null'} 0.077037 1.4171 0.25949 0.57962 -0.094954 0.060195 -0.8071 3.52 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.107 115.86 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28038 1.3599 0.29594 0.52374 0.088781 -0.067576 -0.84454 {'RightHand'} {'null'} 0.077072 1.4171 0.2594 0.57976 -0.095229 0.060112 -0.80697 3.53 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.117 115.87 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28029 1.3599 0.29592 0.52365 0.088697 -0.067646 -0.8446 {'RightHand'} {'null'} 0.077094 1.417 0.25934 0.57995 -0.095401 0.060247 -0.8068 3.53 3.22 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.127 115.88 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28026 1.3598 0.29599 0.52374 0.088904 -0.067509 -0.84453 {'RightHand'} {'null'} 0.077149 1.417 0.25928 0.58001 -0.095044 0.060641 -0.80677 3.56 3.21 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.139 115.89 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.2803 1.3598 0.29608 0.52373 0.089089 -0.067429 -0.84452 {'RightHand'} {'null'} 0.077182 1.4171 0.25925 0.58007 -0.094702 0.060962 -0.80674 3.56 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.149 115.9 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28024 1.3598 0.29599 0.52371 0.089113 -0.067484 -0.84453 {'RightHand'} {'null'} 0.077223 1.4171 0.25922 0.58002 -0.094394 0.060927 -0.80682 3.56 3.19 0.06 -0.07 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.161 115.91 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28024 1.3598 0.29606 0.52364 0.089165 -0.067725 -0.84455 {'RightHand'} {'null'} 0.0772 1.4171 0.25921 0.57998 -0.094445 0.060253 -0.80689 3.51 3.21 0.03 -0.08 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.172 115.92 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28019 1.3595 0.29597 0.52352 0.089106 -0.06791 -0.84462 {'RightHand'} {'null'} 0.0773 1.4169 0.25921 0.57996 -0.09467 0.05975 -0.80692 3.53 3.24 -0.02 -0.08 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.183 115.93 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28008 1.3595 0.29597 0.52339 0.089077 -0.06792 -0.8447 {'RightHand'} {'null'} 0.077376 1.417 0.25917 0.58005 -0.095062 0.059262 -0.80684 3.48 3.25 -0.05 -0.08 1 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.194 115.94 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28008 1.3595 0.29608 0.52317 0.089007 -0.067806 -0.84485 {'RightHand'} {'null'} 0.077386 1.417 0.25912 0.58008 -0.095141 0.059264 -0.80681 3.53 3.22 -0.06 -0.08 0.99 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.205 115.96 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.28007 1.3594 0.29613 0.52301 0.088863 -0.067627 -0.84498 {'RightHand'} {'null'} 0.077434 1.4171 0.25909 0.58007 -0.095219 0.059544 -0.80679 3.42 3.19 -0.05 -0.08 0.99 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.217 115.97 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.27989 1.3595 0.29614 0.5228 0.088734 -0.067379 -0.84514 {'RightHand'} {'null'} 0.077619 1.4172 0.25903 0.57992 -0.095414 0.059866 -0.80685 3.41 3.2 -0.06 -0.09 0.99 {'null'} NaN NaN 0 NaN NaN NaN {'15-11-2023'} 11:42:29.227 115.98 -0.11 1.62 0.01 -0.14 -0.01 -0.05 -0.99 {'LeftHand'} {'null'} -0.27988 1.3594 0.29622 0.52261 0.088784 -0.067391 -0.84525 {'RightHand'} {'null'} 0.077741 1.4172 0.25897 0.57993 -0.095369 0.060203 -0.80683 3.39 3.2 -0.06 -0.09 0.99 {'null'} NaN NaN 0 NaN NaN NaN

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!