Solving N set of equations with N+1 Unknowns

1 回表示 (過去 30 日間)
Kenneth Tam
Kenneth Tam 2012 年 8 月 13 日
MATLAB Community,
I have been troubled by this problem. I don't have to find a numerical solution to the unknowns. All I want to do is find the other unknowns in terms of a single unknown. I tried using solve(eqn1,... eqnn,var1...varn) leaving the var n+1 as the one I want all the other variables to be defined with but the solution always shows 1x1 sym and when I try to read it the answer shows zero.
Kenneth
The following is my code I am trying to find A1,A2,B1,B2,C1,C2,D1,D2 in terms of w
clear
Y=62.9*10^9;
l=24.5*10^-3;
ls=1*10^-3;
h=300*10^-6;
b1=4*10^-3;
b2=6*10^-3;
d1=7800*b1*h;
d2=7800*b2*h;
I1=(b1*h^3)/12;
I2=(b2*h^3)/12;
d31=-1.74*10^-10;
s11=15.4;
syms A1 B1 C1 D1 A2 B2 C2 D2 x w;
digits(4);
U=10;
P1=(-(3*0.9*d31)/(s11*((1/b1)+(1/b2))))*U
P2=-P1;
ag1 = vpa(sqrt(-(P1/(2*Y*I1))+sqrt(((P1/(2*Y*I1))^2)+((d1*(2*pi*w)^2)/(Y*I1)))));
bg1 = vpa(sqrt((P1/(2*Y*I1))+(sqrt(((P1/(2*Y*I1))^2)+((d1*(2*pi*w)^2)/(Y*I1))))));
ag2 = vpa(sqrt(-(P2/(2*Y*I2))+sqrt(((P2/(2*Y*I2))^2)+((d2*(2*pi*w)^2)/(Y*I2)))));
bg2 = vpa(sqrt((P2/(2*Y*I2))+(sqrt(((P2/(2*Y*I2))^2)+((d2*(2*pi*w)^2)/(Y*I2))))));
def1=A1*cosh(ag1*x)+B1*sinh(ag1*x)+C1*cos(bg1*x)+D1*sin(bg1*x);
def2=A2*cosh(ag2*x)+B2*sinh(ag2*x)+C2*cos(bg2*x)+D2*sin(bg2*x);
A=vpa(def1);
A=subs(A, x, ls)
B=diff(def1);
B=subs(B, x, ls)
C=diff(def2);
C=subs(C, x, 0)
D=diff(def2,3);
D=subs(D, x, 0)
E=vpa(def1-def2);
E=subs(E, x, l)
F=diff(def1)-diff(def2);
F=subs(F, x, l)
G=vpa((Y*I1*diff(def1,2)))+(Y*I2*diff(def2,2));
G=subs(G, x, l)
H=vpa((Y*I1*diff(def1,3))+(P1*diff(def1))+(Y*I2*diff(def2,3))+(P2*diff(def2)));
H=subs(H, x, l)
S = solve(A, B, C, D,E, F,G, H,A1,A2,B1,B2,C1,C2,D1,D2)
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 8 月 13 日
Could you post the equations?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by