Error question :The expression to the left of the equals sign is not a valid target for an assignment

1 view (last 30 days)
Trying to debug this loop (I am pretty new with matlab). I get the error for the last line. Any tips?
for i=2:length(text)
roi=text{i};
eval([roi,'_sani=table2(indici_cnt,i);']);
eval([roi,'_fep=table(indici_fep,i);']);
eval(['table_out.',roi,'=[',roi,'_fep;',roi,'_sani];']);
end
  5 Comments
Stephen23
Stephen23 on 2 Mar 2016
@M.Gloria: screenshots are not very useful for us. Please upload the code using the paperclip button. Then click Choose file and Attach file buttons.

Sign in to comment.

Accepted Answer

Stephen23
Stephen23 on 2 Mar 2016
Edited: Stephen23 on 25 Jun 2019
  1 Comment
Jan
Jan on 2 Mar 2016
@Stephen: What about posting this perfect answer as an own thread and inserting a link to it, when the next one asks for eval? This would allow us to upvote your answer enough.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!