Index exceeds matrix dimensions.

3 次查看(过去 30 天)
malick ndiaye
malick ndiaye 2019-4-25
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 个评论
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 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by