How to substitute values into a symbolic integral function?
4 views (last 30 days)
Show older comments
Hi all,
I have a non linear (integral) model function C, a data measurement y, and a covariance matrix of the data noise Pv. I calculate the error e= y -C(t,theta) and from it a cost function V = e*Pv*e'. In the end V is 1x1 symbolic function that depends only on the parameter vector theta = [alpha, g,k, m], to be integrated over a known interval indicated by tau. I calculate the hessian of V with respect to the parameters, and I obtain a 4x4 symbolic matrix again dependent only on the parameter vector. Here is a piece of one element of H.
%
conj(int((exp(-(k*(m - tau + 20)^2)/(2*tau - 40))*exp(g*(tau - 7420/59))*(k/(2(tau - 20)))^(1/2))/pi^(1/2), tau == 20..5060/59))* ...
%
As you can see there is an integration over tau to be made, but tau interval is known. The problem arises when I try to calculate H for a given set of a parameters:
%
Htheta0 = subs(H,{alpha, g, k, m},{1.5,0.025/60,0.07,10});
%
At this point, the error appears:
%
Error using mupadmex
Error in MuPAD command: Invalid variable. [stdlib::diff]
Error in sym/subs>mupadsubs (line 146)
G = mupadmex('symobj::fullsubs',F.s,X2,Y2);
Error in sym/subs (line 119)
G = mupadsubs(F,X,Y);
%
I am not sure,but I have a feeling that it depends on the integration over tau. Any suggestion to solve the problem?
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!