Index exceeds matrix dimensions.

bonjour, je suis entrain de tester un algorithme pour la protection des données biométriques.
cece est mon code
Quand je fais appel à la fonction qui me donne ceci: L'index dépasse les dimensions de la matrice.
Erreur dans im (ligne 50)
si (BioCodeALL (:, q)> seuil)
Erreur dans premierresultatsbiohas (ligne 2)
[biocode, matrice] = im (I1,0.3);
I1 = double (imread ( 'I100_S8.tif' ))
[biocode, matrice] = im (I1,0.3);
biocode
fonction [BioCode, V] = im (fingercode, seuil)
% x = 6 * rand (1,8);
% I1 = double (imread ('I100_S8.tif'));
% [m, n] = taille (I1)
% n * m
% I1 (:);
[nbr_ligne, nbr_colonne] = taille (code numérique)
% t = remodeler (I1,1, []);
% nbr_deligne = longueur (t)
clé = 123;
A = clé * rand (nbr_colonne, 3);
% [m, n] = taille (A);
m = nbr_colonne;
n = 3;
%% test hypersphère
% r = 100;
% rng (plancher (somme (somme (A))));
% vector_on_hypersphere = r * randn (n, 1);
%
% pour i = 1: n
% A (:, i) = (100 * A (:, i) - (vector_on_hypersphere (i) + barycentre '));
% fin;
%
%
hypershere
BioCode = zéros (n, 3);
V = zéros (m, n);
R = zéros (n, n);
% Processus de Gram-Schmidt
pour k = 1: n
V (:, k) = A (:, k);
pour j = 1: k-1
R (j, k) = V (:, j) '* A (:, k);
V (:, k) = V (:, k) - R (j, k) * V (:, j);
fin
R (k, k) = norme (V (:, k));
V (:, k) = V (:, k) / R (k, k);
fin
V
taille (V)
BioCodeALL = fingercode * V;
BioCodeALL
BioCodeALL = BioCodeALL (:)
longeurbiocode = length (BioCodeALL)
pour q = 1: longeurbiocode
si (BioCodeALL (:, q)> seuil)
BioCode (q) = 1;
fin
fin

댓글 수: 3

Torsten
Torsten 2019년 4월 25일
You try to access "BioCodeALL (:, q)".
But "BioCodeALL" is a row vector, thus only has 1 dimension.
Guillaume
Guillaume 2019년 4월 25일
편집: Guillaume 2019년 4월 25일
As far as I know, matlab in the french speaking world still uses english names for functions and keywords. Is this really valid matlab code?
malick ndiaye
malick ndiaye 2019년 4월 25일
oui oui je vois que je devais parcourrir la ligne au lieu de la colonne.
merci

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2019년 4월 25일

댓글:

2019년 4월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by