Skip to content
Snippets Groups Projects
Commit 49cdfe6b authored by Charlotte Bond's avatar Charlotte Bond
Browse files

can read maxtem off

parent 09a9ef45
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,8 @@
% function [maxtem] = FT_read_maxtem_from_blocks(blocks)
%
% A function for Matlab which reads the value for 'maxtem' found in blocks
% containing FINESSE command lines.
% containing FINESSE command lines. If no maxtem is declared, or maxtem is
% switched off the returned maxtem is nan.
%
% blocks: Block structures containing FINEESE script lines.
%
......@@ -22,9 +23,14 @@ function [maxtem] = FT_read_maxtem_from_blocks(blocks)
line_idx = FT_find_element_in_active_block(blocks(block_idx),1,'maxtem');
% Read maxtem from line
maxtem = cell2mat(FT_parse_line(blocks(block_idx).txt_lines(line_idx),2));
maxtem = FT_parse_line(blocks(block_idx).txt_lines(line_idx),2);
if strcmp(maxtem{1},'off')
maxtem = nan;
else
maxtem = cell2mat(maxtem);
end
elseif length(block_idx)==0
maxtem = 0;
maxtem = nan;
else
result=sprintf('Invalid kat file: maxtem declared more than once');
msgid=[baseid,'checkarguments'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment