| 查看: 1485 | 回復(fù): 12 | ||||
alice919金蟲 (小有名氣)
|
[求助]
幫我看看問(wèn)題出在哪?
|
|
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 幫我看看我的問(wèn)題出在哪,我該怎么解決?這是一個(gè)用來(lái)計(jì)算化學(xué)平衡組成 [ 來(lái)自小組 化工工程工藝 ] |
主管區(qū)長(zhǎng) (職業(yè)作家)
![]() |
專家經(jīng)驗(yàn): +1059 |

金蟲 (小有名氣)
主管區(qū)長(zhǎng) (職業(yè)作家)
![]() |
專家經(jīng)驗(yàn): +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); 這是源程序,可以幫我看看錯(cuò)在哪?是不是要改算法 |
主管區(qū)長(zhǎng) (職業(yè)作家)
![]() |
專家經(jīng)驗(yàn): +1059 |

金蟲 (小有名氣)
主管區(qū)長(zhǎng) (職業(yè)作家)
![]() |
專家經(jīng)驗(yàn): +1059 |
|
出現(xiàn)了。 這一組x已經(jīng)使得原方程相當(dāng)接近于0了,如果這組解符合實(shí)際的話,就可以采用。 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ū)長(zhǎng) (職業(yè)作家)
![]() |
專家經(jīng)驗(yàn): +1059 |

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 一志愿天大材料與化工(085600)總分338 +4 | 蔡大美女 2026-03-13 | 4/200 |
|
|---|---|---|---|---|
|
[考研] 070303一志愿西北大學(xué)學(xué)碩310找調(diào)劑 +6 | d如愿上岸 2026-03-12 | 9/450 |
|
|
[考研] 0703化學(xué)調(diào)劑,求各位老師收留 +9 | 秋有木北 2026-03-14 | 9/450 |
|
|
[考研] 266求調(diào)劑 +5 | 陽(yáng)陽(yáng)哇塞 2026-03-14 | 9/450 |
|
|
[考研] 314求調(diào)劑 +8 | 無(wú)懈可擊的巨人 2026-03-12 | 8/400 |
|
|
[考研] 0854可跨調(diào)劑,一作一項(xiàng)核心論文五項(xiàng)專利,省、國(guó)級(jí)證書40+數(shù)一英一287 +8 | 小李0854 2026-03-16 | 8/400 |
|
|
[考研] 268求調(diào)劑 +7 | 好運(yùn)連綿不絕 2026-03-12 | 8/400 |
|
|
[考研] 326求調(diào)劑 +5 | 上岸的小葡 2026-03-15 | 6/300 |
|
|
[考研] 085600調(diào)劑 +5 | 漾漾123sun 2026-03-12 | 6/300 |
|
|
[考研] 求老師收留調(diào)劑 +4 | jiang姜66 2026-03-14 | 5/250 |
|
|
[考研] 26考研一志愿中國(guó)石油大學(xué)(華東)305分求調(diào)劑 +3 | 嘉年新程 2026-03-15 | 3/150 |
|
|
[考研] 289求調(diào)劑 +4 | 這么名字咋樣 2026-03-14 | 6/300 |
|
|
[考研] 255求調(diào)劑 +3 | 李嘉慧, 2026-03-12 | 4/200 |
|
|
[考研] 材料080500調(diào)劑求收留 +3 | 一顆meteor 2026-03-13 | 3/150 |
|
|
[考研] 266求調(diào)劑 +4 | 學(xué)員97LZgn 2026-03-13 | 4/200 |
|
|
[考研] 材料工程調(diào)劑 +9 | 咪咪空空 2026-03-12 | 9/450 |
|
|
[考研] 工科278分求調(diào)劑 +5 | 周慢熱啊 2026-03-12 | 7/350 |
|
|
[考研] 085600材料與化工 309分請(qǐng)求調(diào)劑 +7 | dtdxzxx 2026-03-12 | 8/400 |
|
|
[考研] 0817化學(xué)工程與技術(shù)考研312分調(diào)劑 +3 | T123 tt 2026-03-12 | 3/150 |
|
|
[考研] 321求調(diào)劑(食品/專碩) +3 | xc321 2026-03-12 | 6/300 |
|