function [dataNormal] = standardizeData(data,min,max)
% Standardize arrays of data in cell array while ignoring NaNs

dataNormal = cell(size(data));

for i = 1:length(data)
    % Extract the data array and compute mean and standard deviation while ignoring NaNs
    dataArr = data{i};
    maximum = max;
    minimum = min;
    
    % Standardize the data while preserving NaNs
    dataNormal{i} = (dataArr - minimum)./(maximum - minimum);
    nanIndices = isnan(dataArr);
    dataNormal{i}(nanIndices) = NaN;
end
    



