Unexpected MATLAB expression error

for ielem=1:nelem
k(1:6,1:6,ielem)=...
XXXXXXXXXXXXXXXXXXXXXX COMPLETE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
error
Error: File: stiffl3.m Line: 30 Column: 24
Unexpected MATLAB expression.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 6월 22일

0 개 추천

The code fragment
XXXXXXXXXXXXXXXXXXXXXX COMPLETE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
is not valid MATLAB code. MATLAB does not automatically use multiplication between adjacent names or tokens. MATLAB only builds a list of items between space-separated tokens when the tokens are inside [] or {} -- but your code is assigning to a scalar element so you would not want a list built at that point anyhow.

카테고리

도움말 센터File Exchange에서 Language Fundamentals에 대해 자세히 알아보기

질문:

2016년 6월 22일

편집:

2023년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by