Warning: Out of range or non-integer values truncated during conversion to character.

7 views (last 30 days)
Hi I was trying to do this loop.And I got these errors:
'Warning: Out of range or non-integer values truncated during conversion to character. Assignment has more non-singleton rhs dimensions than non-singleton subscripts'
for mm = 1:4
dataset=strcat(DataSetU(num2str(mm)),'M',num2str(mm));
dataset(1,mm)=[DataBase{1,mm}];
time=dataset(:,1);
q=dataset(:,4);
....
theta_param(mm)=(X'*X)^-1*X'*qdot;
end
  2 Comments
dpb
dpb on 4 Dec 2014
Give us the line and the error in context at least as a start instead of making us try to divine the problem...
Andil  Aboubakari
Andil Aboubakari on 4 Dec 2014
Sorry the line that cause the error I think is:
dataset=strcat(DataSetU(num2str(mm)),'M',num2str(mm));
dataset(1,mm)=[DataBase{1,mm}];
When I run I get on the command windows only that "Warning: Out of range or non-integer values truncated during conversion to character. Assignment has more non-singleton rhs dimensions than non-singleton subscripts"
It doesn't tell me where :S

Sign in to comment.

Accepted Answer

Thorsten
Thorsten on 4 Dec 2014
Edited: Thorsten on 4 Dec 2014
You use a string as index, that's probably wrong
DataSetU(num2str(mm))

More Answers (0)

Categories

Find more on Loops and Conditional Statements 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!