Skip to content
Snippets Groups Projects
Commit 33f14fec authored by Yoann Guilhem's avatar Yoann Guilhem
Browse files

Code formatting.

parent 71145976
No related branches found
No related tags found
No related merge requests found
...@@ -20,12 +20,12 @@ function par = gtHSTParamReader(filename) ...@@ -20,12 +20,12 @@ function par = gtHSTParamReader(filename)
par = []; par = [];
pattern = '(?<parameter>.*)=(?<value>.*)'; pattern = '(?<parameter>.*)=(?<value>.*)';
if ~exist(filename,'file') if ~exist(filename, 'file')
gtError('gtHSTParamReader', ['Could not find ' filename]); gtError('gtHSTParamReader', ['Could not find ' filename]);
end end
fid = fopen(filename,'rt'); fid = fopen(filename, 'rt');
if fid==-1 if (fid == -1)
gtError('gtHSTParamReader', ['Could not open ' filename]); gtError('gtHSTParamReader', ['Could not open ' filename]);
end end
...@@ -34,8 +34,8 @@ par.correct_rings_nb = -1; ...@@ -34,8 +34,8 @@ par.correct_rings_nb = -1;
while ~feof(fid) while ~feof(fid)
txt = fgetl(fid); txt = fgetl(fid);
hashndx = find(txt=='#', 1, 'first')-1; hashndx = find(txt=='#', 1, 'first') - 1;
exclamndx = find(txt=='!', 1, 'first')-1; exclamndx = find(txt=='!', 1, 'first') - 1;
commentndx = min(union(hashndx, exclamndx)); commentndx = min(union(hashndx, exclamndx));
if ~isempty(commentndx) if ~isempty(commentndx)
...@@ -48,9 +48,9 @@ while ~feof(fid) ...@@ -48,9 +48,9 @@ while ~feof(fid)
field = sfCleanField(tmp.parameter); field = sfCleanField(tmp.parameter);
tmp.value = strtrim(tmp.value); tmp.value = strtrim(tmp.value);
if regexp(field,'^ar2(\d+)') if regexp(field, '^ar2(\d+)')
value = regexprep(field,'ar2(\d+)','$1'); value = regexprep(field, 'ar2(\d+)', '$1');
par.correct_rings_nb = str2double(value)/2 -1; par.correct_rings_nb = str2double(value)/2 - 1;
continue; continue;
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment