variable solve for T help

molar_composition=[30.4/100,43.1/100,21.5/100,3.1/100,1.9/100]
Feed_stream=100
A=[6.8760,6.8968,6.9187,7.1161,6.9509]
B=[1171.1700,1264.9000,1351.9900,1444.5900,1342.3100]
C=[224.4080,216.5440,209.1550,240.1840,219.1870]
P=5625.42
syms T
5625.42==(molar_composition(1))*10.^(A(1)-(B(1)/T+C(1)))
%+(molar_composition(2)/100)*10.^(A(2)-(B(2)/T+C(2)))+(molar_composition(3)/100)*10.^(A(3)-(B(3)/T+C(3)))+(molar_composition(4)/100)*10.^(A(4)-(B(4)/T+C(4)))+(molar_composition(5)/100)*10.^(A(5)-(B(5)/T+C(5)))
solve(T)

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 10월 22일
편집: KALYAN ACHARJYA 2019년 10월 22일

0 개 추천

molar_composition=[30.4/100,43.1/100,21.5/100,3.1/100,1.9/100];
Feed_stream=100;
A=[6.8760,6.8968,6.9187,7.1161,6.9509];
B=[1171.1700,1264.9000,1351.9900,1444.5900,1342.3100];
C=[224.4080,216.5440,209.1550,240.1840,219.1870];
P=5625.42;
syms T
fun=(molar_composition(1))*10.^(A(1)-(B(1)/T+C(1)))==5625.42;
%+(molar_composition(2)/100)*10.^(A(2)-(B(2)/T+C(2)))+(molar_composition(3)/100)*10.^(A(3)-(B(3)/T+C(3)))+(molar_composition(4)/100)*10.^(A(4)-(B(4)/T+C(4)))+(molar_composition(5)/100)*10.^(A(5)-(B(5)/T+C(5)))
solve(fun,T)
Result:
ans =
-1/((549755813888*log(20346100990538375/1099511627776))/(643857516551209*log(10)) + 14948685213335552/80482189568901125)

댓글 수: 5

Parandeep Sandhu
Parandeep Sandhu 2019년 10월 22일
Hello I was wanting T as number not an equation and from some reason it is not taking the numbers out of the data properly.
Steven Lord
Steven Lord 2019년 10월 22일
Use the double or vpa functions to approximate the exact answer by a number.
Parandeep Sandhu
Parandeep Sandhu 2019년 10월 22일
Im unsure of what that is
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 10월 22일
편집: KALYAN ACHARJYA 2019년 10월 22일
clc;
clear;
syms x t
molar_composition=[30.4/100,43.1/100,21.5/100,3.1/100,1.9/100];
Feed_stream=100;
A=[6.8760,6.8968,6.9187,7.1161,6.9509];
B=[1171.1700,1264.9000,1351.9900,1444.5900,1342.3100];
C=[224.4080,216.5440,209.1550,240.1840,219.1870];
P=5625.42;
syms T
fun=(molar_composition(1))*10.^(A(1)-(B(1)/T+C(1)))==5625.42;
%+(molar_composition(2)/100)*10.^(A(2)-(B(2)/T+C(2)))+(molar_composition(3)/100)*10.^(A(3)-(B(3)/T+C(3)))+(molar_composition(4)/100)*10.^(A(4)-(B(4)/T+C(4)))+(molar_composition(5)/100)*10.^(A(5)-(B(5)/T+C(5)))
result=vpa(solve(fun,T));
fprintf('The solution is %.2f\n',result);
Parandeep Sandhu
Parandeep Sandhu 2019년 10월 22일
This is good but T should = 224

이 질문은 마감되었습니다.

태그

질문:

2019년 10월 22일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by