필터 지우기
필터 지우기

why i cannot get full database?

조회 수: 1 (최근 30일)
RACHEL LYN JAHIRIN
RACHEL LYN JAHIRIN 2023년 6월 9일
댓글: Rik 2023년 6월 10일
hello matlab community, is something wrong with my coding below?
feat=zeros(982,40);
for i=1:982
im1=FYPdatabase{i,1};
featim=gmlog(im1);
FYPdatabase{1,5}=featim;
end
i want to insert future extraction in the database but only number 1 got the result, the rest just shown [] as in figure below. can see attach file. Thnkyou for your help, i really appreciate it!
  댓글 수: 3
RACHEL LYN JAHIRIN
RACHEL LYN JAHIRIN 2023년 6월 9일
done reopen
Rik
Rik 2023년 6월 9일
Instead of posting a new question, consider commenting on your previous questions next time. Either explain to the person helping you why their solution didn't work, or accept the answer.

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

채택된 답변

Rik
Rik 2023년 6월 9일
The i strikes again. Never use it as a variable, it is just too similar visually to a 1.
That is what went wrong in your code:
feat=zeros(982,40);
for i=1:982
im1=FYPdatabase{i,1};
featim=gmlog(im1);
%FYPdatabase{1,5}=featim;
FYPdatabase{i,5}=featim;
end
See the difference between the two lines?
Consider using n, m, or k as looping variables. And to use the size of the array to determine the loop count:
feat=zeros(982,40);
for n=1:size(feat,1)
  댓글 수: 2
RACHEL LYN JAHIRIN
RACHEL LYN JAHIRIN 2023년 6월 10일
i already changed it but still cannot get.
Rik
Rik 2023년 6월 10일
I'm a bit confused. Did my solution work for you or not?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by