Interdepending - multivariable problem

1 view (last 30 days)
Sergio Quesada
Sergio Quesada on 6 Oct 2018
Edited: Sergio Quesada on 6 Oct 2018
Good evening to everybody. My problem is the following:
I want to solve a sistem non-linear equations Int(r)-(t-texp)=0 in the variable r with the following complications:
- In "Int", r is in the upper limit of a definite integral of the integrand F(x). I call the solutions "r_teor".
-In the equations, "texp" is a 1x10 array experimental points, so each equation correspond to each valor of "texp".
- "t", which is the other variable in the equations, are the minimums of another function H, which depends itself on "rteor".
I have written down this:
F=@(x) FC.*exp(-(V.*a)./(30.*x.*log(x))); part=1e-3;
L=@(r) 1:part:r;
me=@(r) arrayfun(F,L(r));ue=@(r) F(max(L(r)));
Int=@(r) part.*(sum(me(r))-(ue(r)./2));
options = optimset('Display','iter','TolX',1e-4,'PlotFcns','@optimplotx'); syms r
for i=1:N
t=@(i) (1+(5.*((texp(i)-t0).^0.25)));
r_teor=@(i) fsolve(Int(r)-(t(i)-texp(i)), 1.5);
Itrans=@(i) Io./((r_teor(i)).^4);
Itotal=@(i) Ifar(i)+Itrans(i);
SumError=@(i) sum((Itotal(i)-Iexp).^2);
t= fminbnd(SumError,6e-3,t1-5e-5,options);
, and I have the following error:
Undefined function 'functions' for input arguments of type 'inline'.
Any idea ? Thanks !!!
Sergio Quesada
Sergio Quesada on 6 Oct 2018
Edited: Sergio Quesada on 6 Oct 2018
Hi, mdhan. They're constants that I define in the first line. I ommited them for clarity:
formatSpec='%f %f'; sizeSpec=[2,Inf];
datos=fscanf(fID,formatSpec,sizeSpec); close('all');N=Columnexpf-Columnexpi+1;
texp=datos(1, Columnexpi:Columnexpf);Iexp=datos(2, Columnexpi:Columnexpf); t1=texp(1);

Sign in to comment.

Answers (0)


Find more on Systems of Nonlinear Equations in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!