Unexpected MATLAB expression error

1 Ansicht (letzte 30 Tage)
AFAQ AHMAD
AFAQ AHMAD am 22 Jun. 2016
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.
  2 Kommentare
John D'Errico
John D'Errico am 22 Jun. 2016
There is no question here.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 22 Jun. 2016
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.

Kategorien

Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by