This is the code I have written:
if true % code
endone=sym('cosd(45.4)*G1+G2=0');two=sym('-G9-cosd(46.5)*G8=0');three=sym('1107.14+sind(46.5)*G8=0');four=sym('4000=G7+sind(46.5)*G5');five=sym('G9=cosd(46.5)*G5+G6');six=sym('cosd(46.5)*G8=G4');seven=sym('-sind(46.5)*G8-G7=500');eight=sym('G4+cosd(46.5)*G5-cosd(45.4)*G1=0');nine=sym('-G3-sind(46.5)*G5-sind(45.4)*G1=1000');[G1,G2,G3,G4,G5,G6,G7,G8,G9]=solve(one,two,three,four,five,six,seven,eight,nine)fprintf(['G1=%.3f;\nG2=%.3f;\nG3=%.3f;\nG4=%.3f;\nG5=%.3f;\nG6=%.3f;'... '\nG7=%.3f;\nG8=%.3f;\nG9=%.3f\n'],double(G1),double(G2),double(G3)... ,double(G4),double(G5),double(G6),double(G7),double(G8),double(G9))
And this is the error I recieve:
if true % codeendError using symengineDOUBLE cannot convert the input expression into a double array.if true % codeendError in sym/double (line 613) Xstr = mupadmex('symobj::double', S.s, 0);
Best Answer