Location: BG_NKE @ 043f2808e970 / matlab_parameter_fitting / dataset_functions / load_Hansen_Nai.m

Author:
Shelley Fong <sfon036@UoA.auckland.ac.nz>
Date:
2024-11-08 12:23:21+13:00
Desc:
Adding exposure files and sedml
Permanent Source URI:
https://staging.physiomeproject.org/workspace/827/rawfile/043f2808e970d46594145d0d88d04b3822387d4f/matlab_parameter_fitting/dataset_functions/load_Hansen_Nai.m

function struct_output = load_Hansen_Nai(file_path)

file_id = fopen(file_path);
data = textscan(file_id,'%s','delimiter','\n');
fclose(file_id);

Nai_vec = [5; 10; 30; 50; 80];
num_Nai_conc = length(Nai_vec);

data = data{1};

struct_output = struct('Nai',Nai_vec,...
    'cyc_rate',zeros(num_Nai_conc,1));

for i_line = 1:num_Nai_conc
    line = data{1+i_line};
    line_split = regexp(line,',','split');
    struct_output.cyc_rate(i_line) = str2double(line_split(2));
end

end