Skip to content
Snippets Groups Projects
Commit a75e5d5d authored by Olivier Sauter's avatar Olivier Sauter
Browse files

fix case expression is cell array

parent b44fc89f
No related branches found
No related tags found
1 merge request!145changes quote-quote to double quote, make liuqe option supersede from start,...
Pipeline #183120 passed
......@@ -299,16 +299,23 @@ if isfield(gdat_data.gdat_params,'liuqe') && ~isempty(gdat_data.gdat_params.liuq
liuqe_version = gdat_data.gdat_params.liuqe;
else
% if no specific liuqe requested in the parameter option, but specified e.g. in tcv_eq, use that one otherwise default
if any(regexpi(mapping_for_tcv.expression,'fbte','once'))
liuqe_version = -1
if ~iscell(mapping_for_tcv.expression)
bb{1} = mapping_for_tcv.expression;
else
ij = regexpi(mapping_for_tcv.expression,'LIUQE\.M.?','once');
if ~isempty(ij) && any(regexpi(mapping_for_tcv.expression,'LIUQE\.M[2,3]','once'))
liuqe_version = str2num(mapping_for_tcv.expression(ij+7))
end
ij = regexpi(mapping_for_tcv.expression,'LIUQE[^\.]','once');
if ~isempty(ij) && any(regexpi(mapping_for_tcv.expression,'LIUQE[2,3]','once'))
liuqe_version = str2num(mapping_for_tcv.expression(ij+5))
bb = mapping_for_tcv.expression;
end
for i=1:numel(bb)
if any(regexpi(bb{i},'fbte','once'))
liuqe_version = -1
else
ij = regexpi(bb{i},'LIUQE\.M.?','once');
if ~isempty(ij) && any(regexpi(bb{i},'LIUQE\.M[2,3]','once'))
liuqe_version = str2num(bb{i}(ij+7))
end
ij = regexpi(bb{i},'LIUQE[^\.]','once');
if ~isempty(ij) && any(regexpi(bb{i},'LIUQE[2,3]','once'))
liuqe_version = str2num(bb{i}(ij+5))
end
end
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