error-index exceeds matrix dimension

in the following code i got error and not resolve this error to train network for new algrithm.please help me how to set data values.
grayFeat=graymatterimageMatrix(find(graymatterimageMatrix~=1));
whiteFeat=whitematterimageMatrix(find(whitematterimageMatrix~=0));
csfFeat=csfimageMatrix(find(csfimageMatrix~=0));
trainingFeat=[grayFeat;whiteFeat;csfFeat];
trainingFeat=double(trainingFeat);
TrainSet=[trainingFeat(1:249543);trainingFeat(249544:322292);trainingFeat(322293:359819)];
TrainOut = zeros(359819,3);
TrainOut(1:249543,1) = 1;
TrainOut(249544:322292,2) = 1;
TrainOut(322293:359819,3)=1;

댓글 수: 7

Walter Roberson
Walter Roberson 2020년 12월 7일
What is size(trainingFeat)
rosi khan
rosi khan 2020년 12월 21일
grayFeat,whiteFeat,csfFeat each contain 25 images
At the command line give the command
dbstop if error
and run your code. When the problem occurs, give the command
size(trainingFeat)
and show us the result. Also show us which line the problem occurs on
rosi khan
rosi khan 2020년 12월 22일
sure sir.
Walter Roberson
Walter Roberson 2020년 12월 22일
Okay, and what was the result you got?
rosi khan
rosi khan 2020년 12월 25일
resolve the error.thanks
Walter Roberson
Walter Roberson 2020년 12월 25일
You fixed the error?

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

질문:

2020년 12월 7일

댓글:

2020년 12월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by