%  @param directory to data
%  @return The name of input Pad
%  @return The value
%  @return The timestamp
function [CPUPad, CPUValue, CPUTimestamp] = LoadCPU(dirpath)

    filename = fullfile(dirpath, "cpu_serie_name_list.csv");
    opts = delimitedTextImportOptions();
    opts.Delimiter = [" ", ","];
    file = readmatrix(filename,opts);

    CPUPadSize = size(file);
    CPUPad=string(file);
    clear file, opts;

    filename = fullfile(dirpath, "cpu_value_mat.csv");
    opts = delimitedTextImportOptions();
    opts.Delimiter = [" ", ","];
    file = readmatrix(filename,opts);

    arrayY = str2double(cell2mat(file(4,3)));
    arrayX = str2double(cell2mat(file(5,3)));

    CPUValue = [];
    column = [];
    for x = 1:arrayX        
        X=x-1;
        for y = 1:arrayY
            Y=y-1;
            column(end+1) = str2double(cell2mat(file(6+Y, 2+X)));
        end
        CPUValue(end+1,:) = column;
        column = [];
    end 
    clear file, opts, column ;


    filename = fullfile(dirpath, "cpu_timestamp_mat.csv");
    opts = delimitedTextImportOptions();
    opts.Delimiter = [" ", ","];
    file = readmatrix(filename,opts);

    sizeNum = size(file);
    arrayY = str2double(cell2mat(file(4,3)));
    arrayX = str2double(cell2mat(file(5,3)));

    CPUTimestamp = [];
    column = [];
    for x = 1:arrayX        
        X=x-1;
        for y = 1:arrayY
            Y=y-1;
            column(end+1) = str2double(cell2mat(file(6+Y, 2+X)));
        end
        CPUTimestamp(end+1,:) = column;
        column = [];
    end 
    clear file, opts, column ;
end
