Erreur permanente en matlab

Fermé
Zakaria-nr Messages postés 1 Date d'inscription lundi 15 décembre 2014 Statut Membre Dernière intervention 15 décembre 2014 - 15 déc. 2014 à 21:27
bonsoir tt le monde j arrive po a faire marcher se script matlab a chaque fois que je change qlq chose une erreur se manifeste :


I=imread('C:\Users\pc\Documents\MATLAB\tp-coder-decoder\images du tp\dp.jpg');
I = im2double(I);
I= rgb2gray(I);
T = dctmtx(8);


fun = @(block_struct)T * block_struct.data * T' ;
B = blockproc(I,[8 8],fun);

B
mask = [1 1 1 1 0 0 0 0
1 1 1 0 0 0 0 0
1 1 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0];
B2 = blockproc(B,[8 8],@(block_struct) mask .* block_struct.data);
invdct = @(block_struct) T' * block_struct.data * T;
I2 = blockproc(B2,[8 8],invdct);
imshow(I), figure, imshow(I2)