| 5 | 1/1 | 返回列表 |
| 查看: 1491 | 回復: 12 | |||
| 當前只顯示滿足指定條件的回帖,點擊這里查看本話題的所有回帖 | |||
alice919金蟲 (小有名氣)
|
[求助]
幫我看看問題出在哪?
|
||
|
options = Display: 'iter' MaxFunEvals: [] MaxIter: [] TolFun: [] TolX: [] FunValCheck: [] OutputFcn: [] PlotFcns: [] ActiveConstrTol: [] Algorithm: [] AlwaysHonorConstraints: [] BranchStrategy: [] DerivativeCheck: [] Diagnostics: [] DiffMaxChange: [] DiffMinChange: [] FinDiffType: 'central' GoalsExactAchieve: [] GradConstr: [] GradObj: [] HessFcn: [] Hessian: [] HessMult: [] HessPattern: [] HessUpdate: [] InitialHessType: [] InitialHessMatrix: [] InitBarrierParam: [] InitTrustRegionRadius: [] Jacobian: [] JacobMult: [] JacobPattern: [] LargeScale: 'off' LevenbergMarquardt: [] LineSearchType: [] MaxNodes: [] MaxPCGIter: [] MaxProjCGIter: [] MaxRLPIter: [] MaxSQPIter: [] MaxTime: [] MeritFunction: [] MinAbsMax: [] NodeDisplayInterval: [] NodeSearchStrategy: [] NonlEqnAlgorithm: [] NoStopIfFlatInfeas: [] ObjectiveLimit: [] PhaseOneTotalScaling: [] Preconditioner: [] PrecondBandWidth: [] RelLineSrchBnd: [] RelLineSrchBndDuration: [] ScaleProblem: [] Simplex: [] SubproblemAlgorithm: [] TolCon: [] TolConSQP: [] TolGradCon: [] TolPCG: [] TolProjCG: [] TolProjCGAbs: [] TolRLPFun: [] TolXInteger: [] TypicalX: [] UseParallel: [] Norm of First-order Trust-region Iteration Func-count f(x) step optimality radius 0 3 2.06697e+014 2.49e+014 1 1 6 1.03581e+012 0.92278 2.86e+013 1 2 9 4.38753e+007 0.0759773 5.33e+011 2.31 3 12 0.0824035 0.000500989 3.85e+007 2.31 4 15 1.18085e-013 2.17124e-008 3.77e+003 2.31 5 16 1.18085e-013 3.37394e-017 3.77e+003 2.31 Equation solved, fsolve stalled. fsolve stopped because the relative size of the current step is less than the default value of the step size tolerance squared and the vector of function values is near zero as measured by the default value of the function tolerance. <stopping criteria details> x = 1.0000 0.9993 fval = 1.0e-006 * -0.3436 0.0006 extiflag = 2 output = iterations: 5 funcCount: 16 algorithm: 'trust-region-dogleg' firstorderopt: 3.7653e+003 message: [1x774 char] JAC = 1.0e+010 * 1.0957 -0.0000 -0.0013 0.0013 幫我看看我的問題出在哪,我該怎么解決?這是一個用來計算化學平衡組成 [ 來自小組 化工工程工藝 ] |
金蟲 (小有名氣)
|
function ChemEquil clear all clc global P P=600; %壓力單位:kpa %m=50; %氫氣:草酸二甲酯摩爾比 %KP1=[23.4 21.8 20.3 18.9 17.6 16.4 15.3 14.2 13.3 12.4 11.5 10.8]; %KP2=[0.0393 0.0375 0.0358 0.0342 0.0328 0.0314 0.0301 0.0289 0.0277 0.0267... % 0.0257 0.0247]; %KP3=[4.4346E05 3.6476E05 3.0202E05 2.5168E05 2.1101E05 1.7796E05 1.5094E05... %1.2872E05 1.1036E05 0.9509E05 0.8233E05 0.7163E05]; %x0=0.001; %x=fsolve(@equil1,x0,[]) x0=[1 0 ]'; options=optimset('Display','iter', 'LargeScale','off','TolFun', 1.0e-22,'TolX',1.0e-22) [x,fval,extiflag,output,JAC]=fsolve(@equil1,x0,options) %................................................... %平衡組成關系式 function f=equil1(x) global P %f=x^2*(51-x)-21.8*((50-2*x)^2*(1-x)*P) tmp1=50-2*x(1)-2*x(2); tmp2=51-x(1)-x(2); f(1)=(x(1)-x(2))*(x(1)+x(2))*tmp2*100-8630*((1-x(1))*tmp1^2*P); f(2)=(x(1)+x(2))*x(2)*tmp2*100-10.4*((x(1)-x(2))*tmp1^2*P); 這是源程序,可以幫我看看錯在哪?是不是要改算法 |
主管區(qū)長 (職業(yè)作家)
![]() |
專家經(jīng)驗: +1059 |

金蟲 (小有名氣)
主管區(qū)長 (職業(yè)作家)
![]() |
專家經(jīng)驗: +1059 |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 284求調(diào)劑 +9 | Zhao anqi 2026-03-22 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 269求調(diào)劑 +4 | 我想讀研11 2026-03-23 | 4/200 |
|
|
[考研] 一志愿重慶大學085700資源與環(huán)境,總分308求調(diào)劑 +7 | 墨墨漠 2026-03-23 | 8/400 |
|
|
[考研] 上海電力大學材料防護與新材料重點實驗室招收調(diào)劑研究生(材料、化學、電化學,環(huán)境) +3 | 我愛學電池 2026-03-23 | 3/150 |
|
|
[考研] 08工學調(diào)劑 +7 | 用戶573181 2026-03-20 | 11/550 |
|
|
[考研] 350求調(diào)劑 +6 | weudhdk 2026-03-19 | 6/300 |
|
|
[考研] 298求調(diào)劑一志愿211 +3 | 上岸6666@ 2026-03-20 | 3/150 |
|
|
[考研] 一志愿華中科技大學071000,求調(diào)劑 +4 | 沿岸有貝殼6 2026-03-21 | 4/200 |
|
|
[考研] 336求調(diào)劑 +5 | rmc8866 2026-03-21 | 5/250 |
|
|
[考研] 265求調(diào)劑 +12 | 梁梁校校 2026-03-19 | 14/700 |
|
|
[考研] 22 350 本科985求調(diào)劑,求老登收留 +3 | 李軼男003 2026-03-20 | 3/150 |
|
|
[考研] 求調(diào)劑 +3 | 白QF 2026-03-21 | 3/150 |
|
|
[考研] 化學求調(diào)劑 +4 | 臨澤境llllll 2026-03-17 | 5/250 |
|
|
[考研] 華東師范大學-071000生物學-293分-求調(diào)劑 +3 | 研究生何瑤明 2026-03-18 | 3/150 |
|
|
[考研] 308求調(diào)劑 +3 | 阿姐阿姐家啊 2026-03-18 | 3/150 |
|
|
[考研] A區(qū)線材料學調(diào)劑 +5 | 周周無極 2026-03-20 | 5/250 |
|
|
[考研] 求調(diào)劑 +3 | eation27 2026-03-20 | 3/150 |
|
|
[考研] 材料學碩318求調(diào)劑 +5 | February_Feb 2026-03-19 | 5/250 |
|
|
[考研] 一志愿中國海洋大學,生物學,301分,求調(diào)劑 +5 | 1孫悟空 2026-03-17 | 6/300 |
|
|
[考博] 申博26年 +3 | 八6八68 2026-03-19 | 3/150 |
|