The following code is not giving errors, but it does not solve the system of equations.

1 view (last 30 days)
syms X_1 X_2 X_3 X_4 X_5 X_6 X_7 X_8 X_9 X_10 X_11 X_12 X_12 X_13 X_14 X_15 X_16 X_17 X_18 X_19 X_20 X_21 X_22 X_23 X_24 X_25 X_26
eq1=X_2
eq2=(-225000*X_1+35000*X_17+49000*sin(X_19)-52500*sin(X_21)-1000*X_2+1000*X_18+1400*cos(X_19)*X_20-1500*cos(X_21)*X_22-3.35^(-4)*X_3)/59
eq3= (-1*X_3-4.515^13*3.35^(-4)*(X_18+1.4*X_20*cos(X_19)-1.5*X_22*cos(X_21)-X_2) +((10342500-(X_4/abs(X_4)*X_3))/abs(10342500-(X_4/abs(X_4)))*X_3) *1.545^9*sqrt(abs(10342500-(X_4/abs(X_4))*X_3))*X_4) -4.515^13*3.35^(-4)*(X_18 + 1.4*X_20*cos(X_19) - 1.5*X_22*cos(X_21) - X_2) -X_3 - X_2
eq4=-X_4/0.003
eq5=X_6
eq7= -X_7 + (-1*X_7-4.515^13*3.35^(-4)*(X_18+1.4*X_20*cos(X_19)+1.5*X_22*cos(X_21)-X_6)+((10342500-(X_8/abs(X_8)*X_7))/abs(10342500-(X_8/abs(X_8)))*X_7)*1.545*10^9*sqrt(abs(10342500-(X_8/abs(X_8))*X_7))*X_8)*X_8 + -4.515^13*3.35^(-4)*(X_18 +1.4*X_20*cos(X_19) + 1.5*X_22*cos(X_21) - X_6)
eq8= - X_8/0.003 + X_24/0.003
eq9=X_10
eq11= -X_11 + (-1*X_11 -4.515^13*3.35^(-4)*(X_18-1.7*X_20*cos(X_19)-1.5*X_22*cos(X_21)-X_10) +((10342500-(X_12/abs(X_12)*X_11))/abs(10342500-(X_12/abs(X_12)))*X_11) *1.545^9*sqrt(abs(10342500-(X_12/abs(X_12))*X_11))*X_12)*X_12 -4.515^13*3.35^(-4)*(X_18 - 1.7*X_20*cos(X_19) - 1.5*X_22*cos(X_21) - X_10)
eq12= -X_12/0.003 + X_25/0.003
eq13=X_14
eq15= -X_15 - 4.515^13*3.35^(-4)*(X_18 - 1.7*X_20*cos(X_19) + 1.5*X_22*cos(X_21) - X_14) + -1*X_11-4.515^13*3.35^(-4)*(X_18-1.7*X_20*cos(X_19)+1.5*X_22*cos(X_21)-X_14) +((10342500-(X_16/abs(X_16)*X_15))/abs(10342500-(X_16/abs(X_16)))*X_15)*X_15 -1.545^9*sqrt(abs(10342500-(X_16/abs(X_16))*X_15))*X_16
eq16=- X_16/0.003 + X_26/0.003
eq17=X_18
eq18=((35000*X_1 + 35000*X_5 + 38000*X_9 + 38000*X_13- 146000*X_17 -(-31200)*sin(X_19)+ 1000*X_2 +1000*X_6 +1100*X_10 + 1100*X_14- 4200*X_18- (-940)*cos(X_19)*X_20)/1500)+3.35^(-4)*(X_3+X_7+X_11+X_15)/1500 + 3.35^(-4)*(X_3 + X_7 + X_11 + X_15)/1500
eq19=X_19
eq20=cos(X_19)/2160*3.35^(-4)*(1.4*(X_3 + X_7) - 1.7*(X_11 + X_15))+(49000*X_1 + 49000*X_5 - 64600*X_9 - 64600*X_13-(-31200)*X_17-356840*sin(X_19)+ 1400*X_2 + 1400*X_6 - 1870*X_10 - 1870*X_14-940*X_18- 10278*cos(X_19)*X_20)
eq21=X_22
eq22=cos(X_21)/460*3.35^(-4)*(-1.5*(X_3 + X_11) +1.5*(X_7 + X_15))+(cos(X_21)*(-52500*X_1+ 52500*X_5 - 57000*X_9 + 57000*X_13-328500*sin(X_21) -2100 + 1500*X_14 -9450*cos(X_21)*X_22)/460)+cos(X_21)*3.35^(-4)*(-1.5*(X_3+X_11) + 1.5*(X_7 + X_15))/460
eqs = [eq1, eq2, eq3, eq4, eq5, eq7, eq8, eq9, eq11, eq12, eq13, eq15, eq16, eq17, eq18, eq19, eq20, eq21, eq22]
[X_1,X_2,X_3,X_4,X_5,X_6,X_7,X_8,X_9,X_10,X_11,X_12,X_13,X_14,X_15,X_16,X_17,X_18,X_19,X_20,X_21,X_22,X_23,X_24,X_25,X_26]=vpasolve(eqs,[X_1,X_2,X_3,X_4,X_5,X_6,X_7,X_8,X_9,X_10,X_11,X_12,X_13,X_14,X_15,X_16,X_17,X_18,X_19,X_20,X_21,X_22,X_23,X_24,X_25,X_26])
I get the output Empty sym: 0-by-1, i need the solve it to determine the equilibrium point which i will use to linearize the system.

Answers (1)

J Chen
J Chen on 13 Dec 2021
In order to solve a system of equations, the number of equations needs to equal the number of variables. You also need ==0 for the equations.
  1 Comment
Walter Roberson
Walter Roberson on 14 Dec 2021
solve() and vpasolve() do not need == 0 : both of them assume == 0 if there is no relation in an expression.
Equation to solve, specified as a symbolic equation or symbolic expression. A symbolic equation is defined by the relation operator ==. If eqn is a symbolic expression (without the right side), the solver assumes that the right side is 0, and solves the equation eqn == 0.

Sign in to comment.

Products


Release

R2015a

Community Treasure Hunt

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

Start Hunting!