Bonjour,
J'ai fait un programme matlab qui roule bien, mais à partir d'un certain nombre d'interation, l'exécution devient de plus en plus lente
je constate la lenteur vient est due au subplot car je la constate avant l'écriture du message 'subplot fait '
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 for i=1:nb A=(find(mat==i)); fprintf('A calcule taille=%i\n',length(A)) if mod(i,nl)~=0 numeroCase=nc*(mod(i,nl)-1)+floor(i/nl)+1; else numeroCase=(nl-1)*nc + floor(i/nl); end if (~isempty(A)) subplot(nl,nc,numeroCase); fprintf('subplot fait ') hist(matDat(A,33),minMois:maxMois) fprintf('hist effectue') end end
NB: nc peut aller jusqu'à 40, nl: 70,nb=nc*nl, et size(matDat )=600 000 x 34, et size(mat)=600 000 x 1
Partager