| 查看: 1484 | 回復: 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 幫我看看我的問題出在哪,我該怎么解決?這是一個用來計算化學平衡組成 [ 來自小組 化工工程工藝 ] |
主管區(qū)長 (職業(yè)作家)
![]() |
專家經(jīng)驗: +1059 |

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

金蟲 (小有名氣)
|
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) %................................................... %平衡組成關(guān)系式 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 |
|
出現(xiàn)了。 這一組x已經(jīng)使得原方程相當接近于0了,如果這組解符合實際的話,就可以采用。 MATLAB的Help中Equation Solved, fsolve Stalled的意思是: fsolve found a point where the sum of squares of function values is less than the square root of the TolFun tolerance. However, the last step was less than the TolX tolerance, indicating the function may be changing rapidly, or that the function is not smooth near the final point. This is the meaning of stalled. |

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

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿吉林大學材料學碩321求調(diào)劑 +4 | Ymlll 2026-03-18 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 330求調(diào)劑 +3 | 小材化本科 2026-03-18 | 3/150 |
|
|
[考研] 311求調(diào)劑 +4 | 冬十三 2026-03-18 | 4/200 |
|
|
[考研] 085600材料與化工 +5 | 安全上岸! 2026-03-16 | 5/250 |
|
|
[考研] 化學工程321分求調(diào)劑 +15 | 大米飯! 2026-03-15 | 18/900 |
|
|
[考研] 311求調(diào)劑 +6 | 26研0 2026-03-15 | 6/300 |
|
|
[考研] 085601求調(diào)劑 +4 | Du.11 2026-03-16 | 4/200 |
|
|
[考研] 290求調(diào)劑 +3 | p asserby. 2026-03-15 | 4/200 |
|
|
[考研] 一志愿蘇州大學材料工程(085601)專碩有科研經(jīng)歷三項國獎兩個實用型專利一項省級立項 +6 | 大火山小火山 2026-03-16 | 8/400 |
|
|
[考研] 材料與化工專碩調(diào)劑 +5 | heming3743 2026-03-16 | 5/250 |
|
|
[考研] 211本,11408一志愿中科院277分,曾在中科院自動化所實習 +6 | Losir 2026-03-12 | 7/350 |
|
|
[考研] 274求調(diào)劑 +5 | 時間點 2026-03-13 | 5/250 |
|
|
[考研] 304求調(diào)劑 +5 | 素年祭語 2026-03-15 | 5/250 |
|
|
[考研] 0703一志愿211 285分求調(diào)劑 +5 | ly3471z 2026-03-13 | 5/250 |
|
|
[考研] 中科院材料273求調(diào)劑 +4 | yzydy 2026-03-15 | 4/200 |
|
|
[考研] 326求調(diào)劑 +3 | mlpqaz03 2026-03-15 | 3/150 |
|
|
[考研] 070305求調(diào)劑 +3 | mlpqaz03 2026-03-14 | 4/200 |
|
|
[考研] 329求調(diào)劑 +3 | miaodesi 2026-03-12 | 4/200 |
|
|
[考研] 土木第一志愿276求調(diào)劑,科研和技能十分豐富,求新興方向的導師收留 +3 | 土木小天才 2026-03-12 | 3/150 |
|
|
[考研] 材料301分求調(diào)劑 +5 | Liyouyumairs 2026-03-12 | 5/250 |
|