Borrar filtros
Borrar filtros

Error is occured when I changed version of Matlab

2 visualizaciones (últimos 30 días)
Sergey Kasyanov
Sergey Kasyanov el 30 de En. de 2018
Comentada: Sergey Kasyanov el 28 de Mzo. de 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 comentario
Adam
Adam el 30 de En. de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 30 de En. de 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 comentario
Sergey Kasyanov
Sergey Kasyanov el 28 de Mzo. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by