Interdepending - multivariable problem

조회 수: 2 (최근 30일)
Sergio Quesada
Sergio Quesada 2018년 10월 6일
편집: Sergio Quesada 2018년 10월 6일
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);
Ifar=@(i)(FD./FC).*(r_teor(i).*exp((V.*a)./(30.*r_teor(i).*log(r_teor(i)))));
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);
end
, and I have the following error:
Undefined function 'functions' for input arguments of type 'inline'.
Any idea ? Thanks !!!
  댓글 수: 2
madhan ravi
madhan ravi 2018년 10월 6일
What’s V,FC,a??
Sergio Quesada
Sergio Quesada 2018년 10월 6일
편집: Sergio Quesada 2018년 10월 6일
Hi, mdhan. They're constants that I define in the first line. I ommited them for clarity:
nombre='C2';t0=6.00E-3;FC=4.24E-1;a=6.05;FD=8.17E-4;Io=15.53;V=25;
fID=fopen('Para_Leer_C2_2219_ptos.txt','r');
Columnexpi=1;Columnexpf=10;
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);
Thanks!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by