現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
6 equation with 6 unknowns
2 ビュー (過去 30 日間)
古いコメントを表示
enis çoko
2020 年 4 月 9 日
Hello everyone ,
I have 6 equations with 6 unknowns and ı dont know how to implement in matlab .Could you please help me ?
967.85 = L+V
611.6812=L*x(1) + V*y(1)
265.1909=L*x(2) +V*y(2)
x(1)*256.98=y(1)*1350.49
x(2)*1350.49=y(2)*556.29
(1-x(1)-x(2))*556.29=(1-y(1)-y(2))*256.98
Unknowns ; L ,V,x(1),x(2),y(1),y(2)
17 件のコメント
enis çoko
2020 年 4 月 9 日
syms L V x1 y1 x2 y2;
eqns = [L+V==967.85, L*x1+V*y1==611.6812, L*x2+V*y2==265.1909, x1/y1==1350.49/256.98, x2/y2==556.29/1350.49, (1-x1-x2)/(1-y1-y2)==256.98/556.29];
S=solve(eqns, [L V x1 y1 x2 y2]);
a=S.L;
b=S.V;
c=S.x1;
d=S.x2;
e=S.y1;
f=S.y2;
fprintf('%.2f\n',a)
fprintf('\n')
fprintf('%.2f\n',b)
fprintf('\n')
fprintf('%.2f\n',c)
fprintf('\n')
fprintf('%.2f\n',d)
fprintf('\n')
fprintf('%.2f\n',e)
fprintf('\n')
fprintf('%.2f\n',f)
I tried this method but one of the solution has minus sign.It must be positive but I can't see where I made a mistake
Torsten
2020 年 4 月 9 日
Rounding the coefficients to two decimal places might cause an unexpected solution.
Mathematica gives two solutions, but both have negative components.
The equations look correctly implemented.
enis çoko
2020 年 4 月 9 日
If I follow a new path for example I want to use ''fsolve'' what should ı do ?
Ameer Hamza
2020 年 4 月 9 日
編集済み: Ameer Hamza
2020 年 4 月 9 日
enis, you mentioned "I tried this method but one of the solution has minus sign.It must be positive"
Do you know for sure that all the solutions of these equations are positive and solutions given by the solve() function are wrong? Or is this a requirement that the solutions should be positive?
enis çoko
2020 年 4 月 9 日
Ameer, this is separation process problem that means x and y unknowns are the concentration and we know that the concentration must be positive.All in all, yes ı am sure about that.
enis çoko
2020 年 4 月 9 日
Could you send me mathematica codes? May be I can rearrange that.I don't think of any other method at this stage.
Ameer Hamza
2020 年 4 月 9 日
enis, yes, from the physical interpretation, it makes sense that the solution must be positive? Can you show us the equations in mathematical form? Because if you put the solution given by MATLAB into your equations, it will satisfy all the equations. I suspect there might be an issue in writing the equations in MATLAB syntax.
Torsten
2020 年 4 月 9 日
I can give you the result:
L = 977.53
V = -9.68
x(1) = 0.6269
x(2) = 0.2779
y(1) = 0.1192
y(2) = 0.6747
Alex Sha
2020 年 4 月 10 日
There is one more solution:
No. 2
l 1763.32683383609
v -795.476833836095
x1 0.379464645385751
x2 -1.58011154773944
y1 0.0722069949212733
y2 -3.83599353593743
enis çoko
2020 年 4 月 10 日
Alex , thanks for your attention but all values must be positive value thats is not enough.
Ameer Hamza
2020 年 4 月 10 日
enis, please recheck your hand derivations. The negative solution does satisfy these equations. There may be a mistake in these equations, or there is some error in the numeric coefficients.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)