필터 지우기
필터 지우기

How to solve the following equations with a given data. I need the correct coding to solve .

조회 수: 1 (최근 30일)
clc
clear all
D=1600;
C0=400;
Ch=10;
Cb=600;
Gamma=0.7;
Cl=2000;
b=250;
lamda=0.09;
beta=0.1;
syms Q,r
solve(Q,r);
r=(( Gamma*((Cb*D)-((1+Lamda)*Ch*Q)))+(Cl*(1-Gamma)*D))*b)/(((1-Gamma)*(((1+Lamda)*Ch*Q)+(Cl*D)))+(Gamma*Cb*D));
Q=(2*(Q^beta)*b*D)+(b*(Q^2)*Ch*(1+lamda))-((Gamma*Cb*D)+(Cl*(1-Gamma)*D)*((r^2)-(2*r*b)+(b^2)));
r=solve(subs(Q));
Answer Q=1455 and r = 247.5
  댓글 수: 4
shunmugam hemalatha
shunmugam hemalatha 2020년 6월 30일
Good morning sir,
Actually, they have given in a different notation. Also, I got the answer for r =247.5 by substituting the value of Q = 1455. (Just for verification)
The only problem is to find the 'Q', which is obtained by solving the equation (what i have given ), thereby substituting the equation 'r' in that. So that I need your help.
Thank You very much for your response.

댓글을 달려면 로그인하십시오.

답변 (1개)

madhan ravi
madhan ravi 2020년 6월 30일
The below code is the way to solve them but the answer is no way near to get what you want , you have to experiment yourself to check if you input the eqautions properly.
D=1600;
C0=400;
Ch=10;
Cb=600;
Gamma=0.7;
Cl=2000;
b=250;
Lamda=0.09;
beta=0.1;
syms Q r positive
eq = [ ((Gamma*((Cb*D)-((1+Lamda)*Ch*Q)))+(Cl*(1-Gamma)*D)*b) /...
(((1-Gamma)*(((1+Lamda)*Ch*Q)+(Cl*D)))+(Gamma*Cb*D));...
(2*(Q^beta)*b*D)+(b*(Q^2)*Ch*(1+Lamda))-...
((Gamma*Cb*D)+(Cl*(1-Gamma)*D)*((r^2)-(2*r*b)+(b^2)))];
[Q,r] = solve(eq,'real',1)
double(Q)
double(r)
  댓글 수: 1
shunmugam hemalatha
shunmugam hemalatha 2020년 6월 30일
Once again I'm really for your response.
Sir,
Just now I took the picture of those two equations. And while I’m using the code, still, I didn’t get the answer. It shows like this.
ans =
1.1646e+04.
In this page, the picture is not getting pasted. So i will put in the Question page.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by