%  @param directory to data
%  @return The name of input Pad
%  @return The value
%  @return The timestamp
function [bitratePad, bitrateTime, bitrateTimestamp] = LoadBitrate(dirpath)
    

    filename = fullfile(dirpath, "bitrate_pad_name_list.csv");
    opts = delimitedTextImportOptions();
    opts.Delimiter = [" ", ","];
    file = readmatrix(filename,opts);   
    
    interlatencyPad_count = str2double(cell2mat(file(5,3)));
    cell={};
    for i = 1:interlatencyPad_count
        cell(end+1) = (file(10+(5*(i-1)), 1));
    end    
    bitratePad = string(cell);
    clear file, opts, cell ;


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

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

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


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

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

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

end
