how to remove index exceeds matrix dimensions in matlab?reply me.
조회 수: 1 (최근 30일)
이전 댓글 표시
num_images = numel(filenames); %num_images=165
image_dims = [40 40];
images = zeros(prod(image_dims),num_images);
PI = 11; images per person
P = 15 no. of person
id = zeros(20,PI);
for i = 1:20 % i is runs time means i run 10 times
id(i,:) = randperm(PI);
end
save id
run = runs + 1;
for k = 1:run
disp(k);
m = id(k,:);
for i = 1:15
for j = 1:11
ind = (i-1) * 11 + j;
if (m(1) == j) || (m(2) == j)
ind1 = [ind1 ind];
else
ind2 = [ind2 ind];
end
end
end
train = images(:,ind2);
test = images(:,ind1);
댓글 수: 2
Walter Roberson
2016년 5월 8일
You need to post the complete error message, so that we do not need to guess about which line the error is occurring on.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!