フィルターのクリア

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 Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by