How to solve 7 unknowns with 7 equations with ln

13 ビュー (過去 30 日間)
Shazreen
Shazreen 2014 年 11 月 18 日
回答済み: MA 2014 年 11 月 18 日
I have 7 equations containing 7 unknowns: nMj, nMk, pHj, pMj, pHk, pMk, Am. Following are my equations.
eq 1: 50=nMj+nMk
eq2: 500=pHj+pMj
eq3: 20=pHk+pMk
eq4: pHj=(22500/(45+nMj))
eq5: pHk=(8100/(405+nMk))
eq6: 405=(0.000343*Am*((450-pHj)/ln((450-pHk)/(pHj-pHk))))
eq7: nMk=(0.0000555*Am*((50-pMj)/ln((50-pMk)/(pMj-pMk))))
Below is the code that I've tried to put in. Tried to use the 'solve' function to solve the problem but failed. Could anyone enlighten me on how to solve this? Thank you.
syms nMj nMk pHj pMj pHk pMk Am
eq1=50-nMj-nMk
eq2=500-pHj-pMj
eq3=20-pHk-pMk
eq4=pHj-(22500/(45+nMj))
eq5=pHk-(8100/(405+nMk))
eq6=405-(0.000343*Am*((450-pHj)/ln((450-pHk)/(pHj-pHk))))
eq7=nMk-(0.0000555*Am*((50-pMj)/ln((50-pMk)/(pMj-pMk))))
solve(eq1,eq2,eq3,eq4,eq5,eq6,eq7,nMj,nMk,pHj,pMj,pHk,pMk,Am)

回答 (2 件)

Roger Stafford
Roger Stafford 2014 年 11 月 18 日
Try using 'log' instead of 'ln' for the natural logarithm. I don't think 'solve' recognizes 'ln'.

MA
MA 2014 年 11 月 18 日
clear all
close all
clc;
syms nMj nMk pHj pMj pHk pMk Am
eq1=50-nMj-nMk;
eq2=500-pHj-pMj;
eq3=20-pHk-pMk;
eq4=pHj-(22500/(45+nMj));
eq5=pHk-(8100/(405+nMk));
eq6=405-(0.000343*Am*((450-pHj)/log((450-pHk)/(pHj-pHk))));
eq7=nMk-(0.0000555*Am*((50-pMj)/log((50-pMk)/(pMj-pMk))));
S=solve(eq1,eq2,eq3,eq4,eq5,eq6,eq7);
display('nMj nMk pHj pMj pHk pMk Am')
S=[S.nMj S.nMk S.pHj S.pMj S.pHk S.pMk S.Am]

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by