I'm trying to write a code on image compression.
I = imread('cameraman.bmp');
I = im2double(I);
T = dctmtx(8);
dct = @(block_struct) T * block_struct.data * T';
B = blockproc(I,[8 8],dct);
whenever i try to execute the above line, I encounter with an error as
error: matrix cannot be indexed with .
error: called from
@<anonymous> at line 1 column 45
blockproc at line 135 column 6
please help me with this. thanks.