invalid syntax at '=' at line 10
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mutaz Alsomali
le 5 Fév 2018
Réponse apportée : Star Strider
le 5 Fév 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)
0 commentaires
Réponse acceptée
Star Strider
le 5 Fév 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.
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!