how do I find the minimum of an implicit equation with symbolic variable
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
0 comentarios
Respuestas (1)
Sophie
el 26 de Oct. de 2016
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
0 comentarios
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!