solving non linear equations
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i have imported the data from excel to find out the variable N for different inputs.i have two equations.using two equations i have to find the variable N , in order to find the N value, i have to calculate the J values..i have written the code foe this, i didnt get any errors but i am not getting any result. can anyone help me to find out this ??
i am attaching my code here
syms N J
Qo=xlsread('suspended.xlsx','A:A')
R=xlsread('suspended.xlsx','B:B')
No=xlsread('suspended.xlsx','C:C')
X=xlsread('suspended.xlsx','D:D')
V = 2435 ;
k = 1.076 ;
Kn = 0.27 ;
k=1.076
Y=0.39
kd=0.04
bs=0.15
Xf=0.49
Df=1.04
Dw=1.3
L=0.04
a=2.24
bt=kd+bs
Nstar=N/Kn;
Nmin=Kn/((Y*k/bt)-1)
Lstar=L*(sqrt(k*Xf/Kn*Df))*Df*Dw;
jstar=(J/sqrt(Kn*k*Xf*Df));
Nstar_min=(1/(Y*k*(bt-1)));
nX = size(X,1 );
solutions = cell(1, nX);
for S=1:nX
solutions{S}=solve(Qo(S)*(1+R(S))*(No(S)-N)-V*(a* J+((X(S)*k*N)/(Kn+N))),N,J)
end
eqn1=sqrt((Lstar^1.76)+5.2*(Nstar-Nstar_min)-(Lstar^0.88))/2.6==jstar^0.88;
soln=vpasolve([eqn1],[N,J]);
celldisp(solutions)
0 commentaires
Réponses (1)
Stephan
le 21 Jan 2021
Modifié(e) : Stephan
le 21 Jan 2021
Your code works properly for me. To access the the results - for example for the solution if N in the third iteration use:
>> solutions{3}.N
which is:
ans =
- 35982859979292405178846235256893762420449^(1/2)/1138918124515491800 - 189414339703334141393/1138918124515491800
35982859979292405178846235256893762420449^(1/2)/1138918124515491800 - 189414339703334141393/1138918124515491800
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!