Effacer les filtres
Effacer les filtres

Error is occured when I changed version of Matlab

2 vues (au cours des 30 derniers jours)
Sergey Kasyanov
Sergey Kasyanov le 30 Jan 2018
Commenté : Sergey Kasyanov le 28 Mar 2018
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 commentaire
Adam
Adam le 30 Jan 2018
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.

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 30 Jan 2018
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 commentaire
Sergey Kasyanov
Sergey Kasyanov le 28 Mar 2018

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

Thanks.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by