invalid syntax at '=' at line 10

2 次查看(过去 30 天)
1-clc, clear
2-T=[cosd(48.81) 1 0 0 0 0 0 0 0;
3- 0 -1 0 0 cosd(48.81) 1 0 0 0;
4- -cosd(48.81) 0 0 1 0 0 0 0 0;
5- -sin(48.81) 0 -1 0 0 0 0 0 0;
6- 0 0 0 -1 -cosd(48.81) 0 0 0 0;
7- 0 0 0 0 -sind(48.81) 0 -1 0 -sind(45);
8- 0 0 0 0 0 0 0 0 sind(45);
9- 0 0 0 0 0 0 0 -1 -cosd(45);
10-A=[0; 0; 0; 0; 1800; 1200; 0; 1500; 0];
11- N1=1:9;
12- F=T\A;
13- tbl=[N;F'];
14-disp(' Member Force')
15-disp(' No. Lbf')
16- fprint(' %1i %7.1f\n',tbl)

采纳的回答

Star Strider
Star Strider 2018-2-5
The problem is not Line 10. It is that Line 9 does not have a closing square bracket.
Change Line 9 to:
9- 0 0 0 0 0 0 0 -1 -cosd(45)];
and the error should disappear.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by