필터 지우기
필터 지우기

how do I find the minimum of an implicit equation with symbolic variable

조회 수: 8 (최근 30일)
A K
A K 2016년 10월 26일
답변: Sophie 2016년 10월 26일
Hi i was wondering how you would solve an implicit equation to determine the value of the symbolic variable when the equation is set to zero. My code is outlined:
%
function reboiler_temp=bubble_point(x,A,B,C,P,bubble_components);
% calculate the temperature for the individual components
syms T % Here i don't know T but i want to solve for it later when the function = 0
temp=0;
%bubble_temp=zeros(bubble_components); % there are two values for each function input, i need to find the sum then equate it to 0
for i=1:bubble_components
bubble_temp(i)=10^(A(i)-B(i)/(T+C(i)))*x(i);
temp=temp+bubble_temp(i);
end
reboiler_temp=abs(P-temp);
reboiler_temp=solve(reboiler_temp==0,T)
return;
end
I seem to be getting the wrong solution for this coding, does anyone know if this is a correct approach to deal with symbolic terms

답변 (1개)

Sophie
Sophie 2016년 10월 26일
I guess you have to use symbolic variables here instead of A(i),B(i),C(i). And only in the end substitute elements in result using subs

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by