Problem using integral in a nonlinear system

조회 수: 2 (최근 30일)
Jurgen
Jurgen 2014년 9월 16일
편집: Star Strider 2014년 9월 16일
Hello, I'm trying to solve a 4x4 nonlinear system of equations (using fsolve and lsqnonlin). Two of these equations have integrals, so at first use "int" in them, however, they do not have explicit solutions. So after try to solve using "integral" instead of "int", but not work either. I think the problem is with the integrals, because attempts to calculate it separately I get no results. The integral is:
integral((18000000*(1740853180245066011576893440000000*lambda10 + 518109338505567084173161632431603712*exp(t/10) - 51810602260580064227258209148465058700*t^2*exp(t/10) - 263671875*7452311944676252099^(1/2)*exp(t/20)*(12952650565145016056814552287116264675*t^2*exp(t/10) - 129527334626391771043290408107900928*exp(t/10) - 435213295061266502894223360000000*lambda10)^(1/2) + 5273437500*7452311944676252099^(1/2)*t*exp(t/20)*(12952650565145016056814552287116264675*t^2*exp(t/10) - 129527334626391771043290408107900928*exp(t/10) - 435213295061266502894223360000000*lambda10)^(1/2)))/(435213295061266502894223360000000*lambda10 + 129527334626391771043290408107900928*exp(t/10) - 12952650565145016056814552287116264675*t^2*exp(t/10)),tau,T1)
where even after giving values to the constants that I want to find (lambda10, tau, T1), gives me the following error: "Error using integralCalc / finalInputChecks (line 515) Output of the function must be the same size as the input. If FUN is an array-valued integrand, Set the 'ArrayValued' option to true.
Error in integralCalc / iterateScalarValued (line 315)                  finalInputChecks (x, fx);
Error in integralCalc / vadapt (line 133)              [q, errbnd] = iterateScalarValued (u, TInterval, pathlen);
Error in integralCalc (line 76)          [q, errbnd] = vadapt (@ AtoBInvTransform, interval);
Error in integral (line 89) IntegralCalc Q = (fun, a, b, opstruct); "
Please help!!
  댓글 수: 1
Jurgen
Jurgen 2014년 9월 16일
I forgot to mention that before having the error I posted in the previous comment, first had an error saying: "Error using ^ Inputs must be a scalar and a square matrix. To compute elementwise POWER, use POWER (^.) Instead. "And" Error using * Inner matrix dimensions must agree. ".
Fix it by changing ^. ^ Y * by. *, But not really understand porqu telling me this because all the unknowns are scalar.

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

채택된 답변

Matt J
Matt J 2014년 9월 16일
Do as the error message instructs and call integral() with the 'ArrayValued' option set to true.
  댓글 수: 1
Jurgen
Jurgen 2014년 9월 16일
thanks a lot! Now I'll see if I can solve the system

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by