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
| P=menu('A combien doit s''élever le lissage ?','Lissage par 3','Lissage par 6','Lissage par 9');
if P==1
for i=1:LIGNE
switch mod(i,3)
case 0
matrice(:,1)=[];
matriceLISSE(i/3,:)=(matrice(i,:)+matrice(i-1,:)+matrice(i-2,:))/3;
Excel.Worksheets.Item(3).Range('A:E').Value=matriceLISSE;
otherwise
end
end
elseif P==2
for i=1:LIGNE
switch mod(i,6)
case 0
matrice(:,1)=[];
matriceLISSE(i/6,:)=(matrice(i,:)+matrice(i-1,:)+matrice(i-2,:)+matrice(i-3,:)+matrice(i-4,:)+matrice(i-5,:))/6;
Excel.Worksheets.Item(3).Range('A:E').Value=matriceLISSE;
otherwise
end
end
elseif P==3
for i=1:LIGNE
switch mod(i,9)
case 0
matrice(:,1)=[];
matriceLISSE(i/9,:)=(matrice(i,:)+matrice(i-1,:)+matrice(i-2,:)+matrice(i-3,:)+matrice(i-4,:)+matrice(i-5,:)+matrice(i-6,:)+matrice(i-7,:)+matrice(i-8,:))/9;
Excel.Worksheets.Item(3).Range('A:E').Value=matriceLISSE;
otherwise
end
end
end
??? Undefined function or method 'plus' for input arguments of type 'cell'. |
Partager