How to include nonexplicit constants in the solve function?

1 回表示 (過去 30 日間)
Jose Rojas
Jose Rojas 2013 年 5 月 2 日
Usually to find the intersection between two functions, you can use:
intersection=solve('-es-2.69*Ta+65','-es+6.11*exp((2.492E6/461.7)*(1/273-1/(Ta+273)))','es','Ta');
And it works fine, but when you introduce 65=b1 and b1 comes from other calculations, i keep getting the error:
Warning: Explicit solution could not be found. > In solve at 169
So what i have is this:
b1=e-m1*T --> from this function b1=65
intersection=solve('-es-2.69*Ta+b1','-es+6.11*exp((2.492E6/461.7)*(1/273-1/(Ta+273)))','es','Ta');
Warning: Explicit solution could not be found. > In solve at 169
For some reason the function 'solve' cant recognize that b1 comes from a previous calculation. It seems that only accepts numerical values and stated Vars expressed as symbols (es and Ta for this example).
Am running out of ideas here. Already searched this before and nothing.
Thanks!

採用された回答

Zhang lu
Zhang lu 2013 年 5 月 2 日
編集済み: Zhang lu 2013 年 5 月 2 日
Hi
b=solve('b-65','b');
b=subs(b)
eq1=['-es-2.69*Ta+' num2str(b)];
eq2='-es+6.11*exp((2.492E6/461.7)*(1/273-1/(Ta+273)))';
[Ta,es]=solve(eq1,eq2,'es','Ta')
  2 件のコメント
Jose Rojas
Jose Rojas 2013 年 5 月 2 日
Thank you very much! You are correct! It worked fine on my script!
Thanks for the help Zhang!
Zhang lu
Zhang lu 2013 年 5 月 3 日
U are welcome

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by