Getting an error in symengine when integrating [SOLVED]

EDIT - Apologies, apparently my log2stat variable was empty because I mistakenly limited it to 10 and not 24, sorry!!!
Hello all,
I'm getting a weird error in symengine when I run the following code. What's weird is that it worked before and I can't think of anything I changed when it suddenly stopped working...
Essentially it's taking a curve fitting, copying the formula into a symbolic function, then integrating it from zero to a certain point (log2stat) and from that point to 48.
cfctrl = fit(time,control,'gauss5');
formulactrl=formula(cfctrl);
parameters = coeffnames(cfctrl); %All the parameter names
values = coeffvalues(cfctrl); %All the parameter values
for idx = 1:numel(parameters)
param = parameters{idx};
l = length(param);
loc = regexp(formulactrl, param); %Location of the parameter within the string
while ~isempty(loc)
%Substitute parameter value
formulactrl = [formulactrl(1:loc-1) num2str(values(idx)) formulactrl(loc+l:end)];
loc = regexp(formulactrl, param);
end
end
fxnctrl = str2sym(formulactrl);
df = diff(fxnctrl);
syms x
fxn = df == 0;
log2stat = vpasolve(fxn,x,[0,10]);
ctrl1 = int(fxnctrl,x,0,log2stat)
ctrl2 = int(fxnctrl,x,log2stat,48)
The errors I'm getting are:
Error using symengine
Invalid argument.
Error in sym/int (line 162)
rSym = mupadmex('symobj::intdef',f.s,x.s,a.s,b.s,options);
Error in copycsvsplitthenanalyze (line 64)
ctrl1 = int(fxnctrl,x,0,log2stat)
Thanks in advance!!
Karen

댓글 수: 2

It appears we would need time and control to test this ourselves.
Sure, apologies for not thinking of that!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2019년 6월 18일

편집:

2019년 6월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by