numerical solution of equation
Mostrar comentarios más antiguos
syms m_c_theta1 m_c0 M theta1 j_L0 j_L_theta1 l
syms m_c_gama k1 gama j_L_gama
j_L_theta1=1.5;
theta1=120;
k1=0.423;
gama=180;
m_c_gama=0.9;
j_L_gama=0.3;
l=0.218;
eqn1=m_c_theta1==(m_c0-1/M+1)*cos(theta1)+j_L0*sin(theta1)+1/M-1;
eqn2=j_L_theta1==(-m_c0+1/M-1)*sin(theta1)+j_L0*cos(theta1);
%eqn3=m_m_theta1==1;
%eqn3=j_Lm_theta1==j_Lm0+l*theta1;
%eqn4=m_c_theta2==j_L_theta1*sin(theta2-theta1)+(m_c_theta1+1)*cos(theta2-theta1)-1;
%eqn5=j_L_theta2==j_L_theta1*cos(theta2-theta1)-(m_c_theta1+1)*sin(theta2-theta1);
%m_m_theta2=1;
%qn6=j_Lm_theta2==j_Lm0+l*theta2;
eqn7=m_c_gama==(1/k1)*j_L_theta1*sin(k1*((gama-theta1)*(pi/180))*(180/pi))+m_c_theta1*cos(k1*((gama-theta1)*(pi/180))*(180/pi));
eqn8=j_L_gama==j_L_theta1*cos(k1*((gama-theta1)*(pi/180))*(180/pi))-k1*m_c_theta1*sin(k1*((gama-theta1)*(pi/180))*(180/pi));
%eqn9=j_Lm_gama==j_L_gama;
%m_m_gama=(-m_c_theta2*cos(k1*(gama-theta2))-(1/k1)*j_L_theta2*sin(k1*(gama-theta2)))/(1+l)
m_c_gama=-m_c0;
j_L_gama=-j_L0;
j_L_theta1=(theta1*(pi/180)*l)/2;
j_L_gama=j_L_theta1-l*(gama-theta1)*(pi/180);
%j_L_theta2=j_Lm_theta2;
%j_Lm0=-j_Lm_gama;
%j_L_gama=j_Lm_gama;
eqns = subs([eqn1, eqn2, eqn7, eqn8]);
sol = vpasolve(eqns, m_c0, j_L0, m_c_theta1,M)
Hi all I want solve these equations numerically and I have given all the values required. but it is showing something like that: % m_c0: [0x1 sym] j_L0: [0x1 sym] m_c_theta1: [0x1 sym] M: [0x1 sym]
I am not sure what is the problem. Can anyone help please?
Respuesta aceptada
Más respuestas (1)
John D'Errico
el 20 de Feb. de 2017
0 votos
I recall an old phrase: "If wishes were horses, then beggars would ride."
Just wanting a solution to a set of nonlinear equations to exist does not make that so. Not all such systems of equations must have a solution. MATLAB has told you that no solution was found, although that does not ensure none exists.
2 comentarios
safi58
el 20 de Feb. de 2017
John D'Errico
el 14 de Mzo. de 2017
The empty matrix indicated that no solution existed.
Categorías
Más información sobre Code Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!