필터 지우기
필터 지우기

Index in position 1 exceeds array bounds.

조회 수: 1 (최근 30일)
Maryam Almannaee
Maryam Almannaee 2021년 11월 25일
댓글: DGM 2021년 11월 25일
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
dpb
dpb 2021년 11월 25일
편집: dpb 2021년 11월 25일
By defining trainf first before trying to use it, may be a starting point...
DGM
DGM 2021년 11월 25일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by