How to convert a 80x60 cell of 8x8 block matrices into a matrix array of 640x480?
Show older comments
Hello, So my problem is that I have a cell array that has the dimensions 80x60 cells. In each cell contains a 8x8 matrix of numeric values. What I am trying to do is convert this cell array back into one large matrix array that will have the dimensions of 640x480. Here is what I have done.
bl = [8 8]; %Block size
size_IYdct = [480 640]; %Matrix size of 640x480
num_Ybl = ceil(size_IYdct ./ bl); %Num. of blocks in each dimension
%Converts matrix into a cell with 8x8 blocks
C_Y = mat2cell(I_Ydct,repmat(bl(1),1,num_Ybl(1)), repmat(bl(2),1,num_Ybl(2)));
%The code below is where I get a problem since I cannot properly convert the cell to a matrix
%This ends up with a 8x8 matrix array when I need it to fill the array full of values with dimesions 640x480
for row = 1:60
for col = 1:80
DQ_Ymat = cell2mat(C_Y(row,col));
end
end
Thank you
Accepted Answer
More Answers (0)
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!