ou je trompe dans ce code pour ne pas être exécuté
vraiment j'ai aucune idée any Helppppppppppp
l'affichage de l'erreur est
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 function residuQuadratic p = input('P = '); nbrePoint = 1; point = []; z1= 0; for x = 0:p-1 z = (mod(x^3+x+6, p)); phiEuler = z^(p-1)/2; if mod(phiEuler,p) ~= (p-1) RQ = mod(z,p); for i = 0 : 1: p-1 if (RQ==mod(i^2,p)) z1 = i; nbrePoint = nbrePoint +1; fprintf ('point (%d , %d) et ',x,z1); % point = [point ; x z1]; fprintf('\n'); end end end for i = 0 : nbrePoint for j = 0: nbrePoint point(i,j) = [point ; x z1]; end end end fprintf('\n'); disp(point); fprintf('\n'); end
??? Undefined function or variable "z1".
Error in ==> residuQuadratic at 28
point(i,j) = [point ; x z1];
P = 11
??? Subscript indices must either be real positive integers or logicals.
Error in ==> residuQuadratic at 29
point(i,j) = [point ; x z1];
Partager