Bonjour,

j'ai un code sous Matlab qui calcule une intégrale, je suis entrain de comprendre le fonctionnement de l'algorithme mais j'ai des problèmes.
voilà l'algorithme, sachant que IOTA est un vecteur ligne dont la longueur est celle du vecteur xQ

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
 
sqrt2 = sqrt(2);
sqrtsqrt2 = sqrt(sqrt2);
N = 500;
Q = 10;
DeltaQ = 0.001;
xQ = (-Q:DeltaQ:Q)*sqrt2;
P = 2;
Ratio = 50; % Should be an integer
DeltaP = Ratio*DeltaQ;
xP = (-P:DeltaP:P)*sqrt2;
LengthP = length(xP);
LengthQ = length(xQ);
AmbiguityIOTAP = zeros(LengthP, LengthP);
Indext = -(LengthP+1)/2;
for t = xP,
    Indext = Indext + 1;
    Indexf = 0;
    for f = xP,
        Indexf = Indexf + 1;
        if (Indext < 0),
            AmbiguityIOTAP(Indext+(LengthP+1)/2, Indexf) = DeltaQ*sqrt2*IOTA(1:LengthQ+Indext*Ratio) * ((IOTA(1-Indext*Ratio:LengthQ).*exp(j*2*pi*f*xQ(1:LengthQ+Indext*Ratio))).');
        else
            AmbiguityIOTAP(Indext+(LengthP+1)/2, Indexf) = DeltaQ*sqrt2*IOTA(Indext*Ratio+1:LengthQ) * ((IOTA(1:LengthQ-Indext*Ratio).*exp(j*2*pi*f*xQ(Indext*Ratio+1:LengthQ))).');
        end
    end
end
merci de m'aider c'est très urgent