What should be adjusted to make the script run?

조회 수: 2 (최근 30일)
Emily Simon
Emily Simon 2016년 11월 29일
댓글: Big dream 2016년 12월 5일
I am trying to find the truss member stiffness matrix and I am inputting
k_member _ 1=1/L1*[c1 s1 0 0; 0 0 c1 s1]'*[1 -1; -1 1]*... [c1 s1 0 0; 0 0 c1 s1];
I have defined c1, s1, and L1 previously.
It says "Unexpected matlab expression"

채택된 답변

Steven Lord
Steven Lord 2016년 11월 29일
Variable names cannot contain spaces. "k_member _ 1" (where the quotes are simply to denote the start and end of the name, but are not part of the name) is not a valid variable name; "k_member_1" (same explanation for the quotes) is a valid variable name.

추가 답변 (1개)

Big dream
Big dream 2016년 11월 29일
Could you write again the whole function from k_member_1
  댓글 수: 2
Emily Simon
Emily Simon 2016년 11월 29일
k_member _ 1=1/L1*[c1 s1 0 0; 0 0 c1 s1]'*[1 -1; -1 1]* [c1 s1 0 0; 0 0 c1 s1];
Big dream
Big dream 2016년 12월 5일
i think the value from each L1,s1,c1 are not correct.
I've tried your syntax, but its correct.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Structural Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by