필터 지우기
필터 지우기

Error is occured when I changed version of Matlab

조회 수: 2 (최근 30일)
Sergey Kasyanov
Sergey Kasyanov 2018년 1월 30일
댓글: Sergey Kasyanov 2018년 3월 28일
I have a lot of the code which work correctly in the Matlab 2013b but when I tried evaluate it on the machine with Matlab 2016a it returns an error:
Too many outputs requested. Most likely cause is missing [] around left hand side that has a comma separated list expansion.
Line with an error is next
L.GroundWire(i).(FN{j})=GroundWire.(FN{j}){ISb};
where
ON LEFT
L - object of user-defined class
GroundWire - property of L, structure
FN{ j } - name of field of GroundWire
ON RIGHT
GroundWire - structure
FN{ j } - name of field. each field consists of cells with data
ISb - integer number
What have changed in the new version of Matlab?
I can add that if I contain the expression on the left in braces it causes an another error in both versions of Matlab.
  댓글 수: 1
Adam
Adam 2018년 1월 30일
Simplest way to find out is with the debugger, just put
GroundWire.(FN{j}){ISb}
on the command line and see what the result is. You can also try putting the left-hand side on the command line too:
L.GroundWire(i).(FN{j})
and see what it evaluates to.

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

채택된 답변

Jan
Jan 2018년 1월 30일
I guess, that ISb is not a scalar. Test this using the debugger: https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html. If this is true, this might help:
L.GroundWire(i).(FN{j}) = [GroundWire.(FN{j}){ISb}];
But most likely ISb is not expected to address multiple cell elements, such that the actual problem must be before this line while creating ISb.
  댓글 수: 1
Sergey Kasyanov
Sergey Kasyanov 2018년 3월 28일

Seems to be truth if another functions changed and ISb became an array but I didn't find real cause for this error.

Thanks.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by