how to remove index exceeds matrix dimensions in matlab?reply me.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 8 Mag 2016
You need to post the complete error message, so that we do not need to guess about which line the error is occurring on.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!