Borrar filtros
Borrar filtros

Error while using Size .

12 visualizaciones (últimos 30 días)
jad aoun
jad aoun el 2 de Jun. de 2020
Comentada: jad aoun el 3 de Jun. de 2020
Hello everyone ,
I am really bemused.
Size is not working anymore and keeps sending an error message even for basic algorithms !
For instance :
A = rand(2,3,4,5);
sz = size(A)
Array indices must be positive integers or logical values.
Error in Untitled4 (line 2)
sz = size(A)
Or even
A= [1 2 3]
sz= size(A)
Index exceeds the number of array elements (2).
Error in Untitled4 (line 2)
sz= size(A)
Help plz .
Thx in advance

Respuestas (1)

madhan ravi
madhan ravi el 2 de Jun. de 2020
clear all
clear size % this is what happens when you name a variable same as the function name ;)
  1 comentario
jad aoun
jad aoun el 3 de Jun. de 2020
thank you so much . stupid mistake indeed.

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by