How to convert a 80x60 cell of 8x8 block matrices into a matrix array of 640x480?

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

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2013년 10월 18일
편집: Andrei Bobrov 2013년 10월 18일
DQ_Ymat = cell2mat(C_Y);
Please read about function cell2mat:
doc cell2mat

댓글 수: 1

I just figured out what I did wrong and fixed it. Simple error on how to use cell2mat function.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

질문:

2013년 10월 18일

댓글:

2013년 10월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by