STILL confused on Solver (tried a different approach) NOT SPAM
5 ビュー (過去 30 日間)
古いコメントを表示
please look over my new attempt
the answer for x is suppposed to be 88. I can't seem to get the answer
I am not trying to spam I just tried a new approach. Please Please help.
This is my approach.
clear dlc
%feed composition
z1=.5;
z2=.1;
z3=.15;
z4=.25;
%other given data
F=150;
PD=250;
T=10;
L=150-x;
F=150;
%k-values from chart yi/xi
k1=56;
k2=0.65;
k3=0.175;
k4=0.055;
%total balances
x1=(F*z1)/(k1*x+L);
x2=(F*z2)/(k2*x+L);
x3=(F*z3)/(k3*x+L);
x4=(F*z4)/(k4*x+L);
eqn=k1*x1+k2*x2+k3*x3+k4*x4==1;
sol=solve(eqn);
The only answer I get in command window this time is
>> Project (which is the name of the file)
4 件のコメント
Cris LaPierre
2021 年 4 月 13 日
You haven't declared what x is, so your code is returning an error. Did you mean to make it symbolic?
採用された回答
Cris LaPierre
2021 年 4 月 13 日
Assuming x is symbolic
%feed composition
z1=.5;
z2=.1;
z3=.15;
z4=.25;
%other given data
F=150;
PD=250;
T=10;
syms x
L=150-x;
%k-values from chart yi/xi
k1=56;
k2=0.65;
k3=0.175;
k4=0.055;
%total balances
x1=(F*z1)/(k1*x+L);
x2=(F*z2)/(k2*x+L);
x3=(F*z3)/(k3*x+L);
x4=(F*z4)/(k4*x+L);
eqn=k1*x1+k2*x2+k3*x3+k4*x4==1
sol=solve(eqn)
double(sol)
It looks like there are 4 possible solutions to your equation, of which, a value close to 88 is one of them. If I solve your equation substituting in a value of 88, the result is close to 1.
double(subs(lhs(eqn),x,88))
3 件のコメント
Cris LaPierre
2021 年 4 月 14 日
If you use the exact values returned, every one of them will give you a result of 1. Otherwise, they wouldn't be a solution to the equation. It sounds like you need to maybe come up with a constraint for the solution, like it must be less than 100, for example.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

