invalid syntax at '=' at line 10

6 ビュー (過去 30 日間)
Mutaz Alsomali
Mutaz Alsomali 2018 年 2 月 5 日
回答済み: Star Strider 2018 年 2 月 5 日
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 件)

カテゴリ

Help Center および File ExchangeModel Import についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by