Getting an error in symengine when integrating [SOLVED]
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 18 de Jun. de 2019
It appears we would need time and control to test this ourselves.
Karen Adler
el 18 de Jun. de 2019
Respuestas (0)
Categorías
Más información sobre Code Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!