Borrar filtros
Borrar filtros

Index in position 1 exceeds array bounds.

1 visualización (últimos 30 días)
Maryam Almannaee
Maryam Almannaee el 25 de Nov. de 2021
Comentada: DGM el 25 de Nov. de 2021
I got an error while trying to run this code , this command occurs Index in position 1 exceeds array bounds.
Happy = [trainf(1,:);trainf(3,:);trainf(5,:);trainf(6,:);trainf(15,:);trainf(16,:)];
When running trainf in command window I get
trainf =
[ ]
and when running rref i get
Not enough input arguments.
Error in rref (line 23)
[m,n] = size(A);
how can I fix this error
  2 comentarios
dpb
dpb el 25 de Nov. de 2021
Editada: dpb el 25 de Nov. de 2021
By defining trainf first before trying to use it, may be a starting point...
DGM
DGM el 25 de Nov. de 2021
You don't mention how you're calling rref(), but from the error, it seems you're calling it with no arguments. If you want to find the rref of a matrix, you actually have to specify one.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by