Assignment has more non-singleton rhs dimensions than non-singleton subscripts

n=50;classes=9;deepth=103;for i=1 to 9; index=1;
btraindata{i,1}=zeros(n*n*(classes-1),1,2,deepth);
tbtraindata{i,1}(index,1,1,deepth)=trainclass{i}(k,:);
it is showing assignment has more non-singleton rhs dimensions than nons-singleton subscrits.
pls give me some solution.

댓글 수: 1

Jan
Jan 2019년 3월 4일
편집: Jan 2019년 3월 4일
What is the value of index?
What is the meaning of "i=1 to 9;"?

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

답변 (1개)

You can check this by your own. Insert these lines:
size(tbtraindata{i,1}(index,1,1,deepth))
size(trainclass{i}(k,:))
% before this line:
tbtraindata{i,1}(index,1,1,deepth)=trainclass{i}(k,:)
You will see, that the dimensions do not match. At least one of them is not, what it should be. The readers cannot guess, which one is correct.

카테고리

도움말 센터File Exchange에서 Get Started with Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2019년 3월 4일

편집:

2019년 3월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by