Aller au contenu
View in the app

A better way to browse. Learn more.

Next

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[MATLAB] Matlab:test répétitif dans while

Featured Replies

Posté(e)

Bonsoir,

J'aimerais savoir comment si le max ou bien le min change,j'applique pas cette ligne et que j'initialise MASQUE et conserver le dernier MASQUE

Matrice=Matrice.*MASQUE;

epse=0.0075;
epsilon = 0.005;
MASQUE=ones(256,256);

somme = sum(MASQUE(:));

while(abs(somme)>epsilon)



A_Auto_Cor1=fftshift(ifft2(A_Auto_Cor1.*MASQUE));
G1=abs(A_Auto_Cor1).^2;

A_Auto_Cor2=fftshift(ifft2(A_Auto_Cor2.*MASQUE));
G2=abs(A_Auto_Cor2).^2;

A_Auto_Cor3=fftshift(ifft2(A_Auto_Cor3.*MASQUE));
G3=abs(A_Auto_Cor3).^2;


X_XCor1=fftshift(ifft2(X_XCor1.*MASQUE));
G4=abs(X_XCor1).^2;

X_XCor2=fftshift(ifft2(X_XCor2.*MASQUE));
G5=abs(X_XCor2).^2;

X_XCor3=fftshift(ifft2(X_XCor3.*MASQUE));
G6=abs(X_XCor3).^2;



[A1 ID1] = max(G1(:));
[A2 ID2] = max(G2(:));
[A3 ID3] = max(G3(:));

[M1 id1] = max(G4(:));
[M2 id2] = max(G5(:));
[M3 id3] = max(G6(:));

M123=[M1 M2 M3];
A123=[A1 A2 A3];

MAXC=max(M123)
MINA=min(A123)

if     MAXC==M1
   trans_four_C=TF7;
  elseif MAXC==M2
   trans_four_C=TF8;
  else
   trans_four_C=TF9;
end    

if     MINA==A1
   trans_four_A=TF1;
  elseif MINA==A2
   trans_four_A=TF2;
  else
   trans_four_A=TF3;
end 

%% DC

Matrice=abs(trans_four_C).*cos(angle(trans_four_C) - angle(trans_four_A))-epse*abs(trans_four_A); 
Matrice=Matrice.*MASQUE;


somme = sum(Matrice(:));

   if (abs(somme)<epsilon),break,end       

          if somme>0
          [maximum indice] = max(Matrice(:));
          Matrice(indice) = 0;
          MASQUE(indice) = 0;


          else
          [minimum indice] = min(Matrice(:));
          Matrice(indice) = 0;
          MASQUE(indice) = 0;



          end
   somme = sum(Matrice(:));
end

Merci

Archivé

Ce sujet est désormais archivé et ne peut plus recevoir de nouvelles réponses.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.