Root of a complex function

10 次查看(过去 30 天)
Yusuf Aslan
Yusuf Aslan 2020-6-16
I would like to find T value when X becomes zero, I tried fzero and failed, could someone show me how can I achieve it
T=500:5:1500;
dQa=(1.21141)*(29.10*10.^-3)*(T-298.15)+(1.158*10.^-5)*(T.^2-298.15^2)/2+(-0.6076*10.^-8)*(T.^3-298.15.^3)/3+(1.311*10.^-12)*(T.^4-298.15.^4)/4;
dQb=(1)*(38.91*10.^-3)*(T-413.15)+(3.904*10.^-5)*(T.^2-413.15^2)/2+(-3.104*10.^-8)*(T.^3-413.15.^3)/3+(8.606*10.^-12)*(T.^4-413.15.^4)/4;
dQc=(8.31490)*(29.00*10.^-3)*(T-298.15)+(0.2199*10.^-5)*(T.^2-298.15^2)/2+(0.5723*10.^-8)*(T.^3-298.15.^3)/3+(-2.871*10.^-12)*(T.^4-298.15.^4)/4;
dQd=-301.912;
X=dQa+dQb+dQc+dQd

回答(1 个)

David Hill
David Hill 2020-6-17
编辑:David Hill 2020-6-17
It seens relatively straight forward to solve by brute force. Just keep running while reducing the step size of T until you get the accuracy you desire. I got:
a=min(abs(X));
t=T(find(X==a));%or -a
t=1.204946558342026e3;

类别

Help CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by