Skip to content

Commit 2752aaa

Browse files
committed
fix issue with omitnans in symbolic expressions (to use 'max' in prpensity functions.
1 parent f8a30f2 commit 2752aaa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/+ssit/@Propensity/Propensity.m

+8-1
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,14 @@
701701
exprStr = char(symbolicExpression);
702702

703703
% Get rid of max rules.
704-
exprStr = char(strrep(exprStr,", [], 2, 'omitnan', false",""));
704+
k = strfind(exprStr,', ''omitnan');
705+
if ~isempty(k)
706+
exprStr = [exprStr(1:k-1),')'];
707+
end
708+
709+
% exprStr = char(strrep(exprStr,", [], 2, 'omitnan', false",""));
710+
711+
705712

706713
opVar = {'*','/','^'};
707714
for i = 1:length(opVar)

0 commit comments

Comments
 (0)