Skip to content

Commit

Permalink
fix: importYaml
Browse files Browse the repository at this point in the history
  • Loading branch information
edkerk committed Jun 7, 2023
1 parent 1a3ac32 commit d8c8378
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/io/importYaml.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
if verLessThan('matlab','9.9') %readlines introduced 2020b
fid=fopen(yamlFilename);
line_raw=cell(1000000,1);
i=1;
while ~feof(fid)
line_raw{i}=fgetl(fid);
i=i+1;
end
line_raw(i:end)=[];
line_raw=string(line_raw);
fclose(fid);
else
line_raw=readlines(yamlFilename');
line_raw=readlines(yamlFilename);
end

line_key=regexprep(line_raw,'^ *-? ([^:]+)(:).*','$1');
Expand Down

0 comments on commit d8c8378

Please sign in to comment.