diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index 5a143d72d78500c6e8a40f31a9f27817e99feb63..64585820e6cddf24f27065b477e8a7d56a60225c 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -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