invalid syntax at '=' at line 10

1 view (last 30 days)
Mutaz Alsomali
Mutaz Alsomali on 5 Feb 2018
Answered: Star Strider on 5 Feb 2018
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)

Accepted Answer

Star Strider
Star Strider on 5 Feb 2018
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.

More Answers (0)

Categories

Find more on Model Import in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!