numerical solution of equation
이전 댓글 표시
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?
채택된 답변
추가 답변 (1개)
John D'Errico
2017년 2월 20일
0 개 추천
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
safi58
2017년 2월 20일
John D'Errico
2017년 3월 14일
The empty matrix indicated that no solution existed.
카테고리
도움말 센터 및 File Exchange에서 Code Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!