Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Respected Madhan ravi sir, I accepted your answer . But i'm getting the error.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
> sampleuni
Error using solve (line 268)
Input with 1 variables and output with 2 variables are inconsistent.
Error in sampleuni (line 29)
[Q,r]=solve(eq,'real',1)
Also, Error using symengine
DOUBLE cannot convert the input expression into a double array.
clear all
D=1600;
C0=400;
Ch=10;
Cb=600;
Gamma=0.7;
Cl=2000;
b=250;
lamda=0.09;
beta=0.1;
%Q=1455;
%solve Q;
%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));
%r=subs(r)
%solve r
A=(1+lamda)*Ch;
B = 2*(1-beta)*C0*D;
M = Cb*D;
G=Cl*D;
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)));];
eq= [((A^3)*((1-Gamma)^2)*(Q^(4-beta)))+(2*(A^2)*((1-Gamma)*((Gamma*M)+(1-Gamma)*G)*(Q^(3-beta)))- ((A^2)*B*((1-Gamma)^2)*(Q^2))+(A*((Gamma*M)+(1-Gamma)*G)*(Q^(2-beta))))-(2*A*B*(1-Gamma)*((Gamma*M)+(1-Gamma)*G-(A*b))*Q)-(B*(((Gamma*M)+(1-Gamma)*G-(A*b))^2));
(((Gamma*(M-(A*Q)))+((1-Gamma)*G))*b)/((Gamma*M)+((1-Gamma)* (G+(A*Q))))];
%y=solve(subs(x));
%solve(y)
[Q,r]=solve(eq,'real',1)
%solve(eq,real,1)
%solve (eq,Q,r)
double(Q)
double(r)
1 commentaire
Rik
le 30 Juin 2020
You seem to be fragmenting your responses. Maybe you should keep them in a single thread. That way everyone knows where to look for new posts.
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!