mat2cell operation - add operation every cell

1 view (last 30 days)
i have an mat2cell A 12*12 blocks cell, each cell there's 8*8 pixel. then i have mat2cell B 8*8 blocks cell wih each cell there's 8*8 pixel. i want to make operation that every cell in mat2cell B add with whole cell in mat2cell A.
A = mat2cell(x, [8 8 8 8 8 8 8 8 8 8 8 8] , [8 8 8 8 8 8 8 8 8 8 8 8]);
B = mat2cell(y, [8 8 8 8 8 8 8 8] , [8 8 8 8 8 8 8 8]);
  2 Comments
Walter Roberson
Walter Roberson on 23 Jan 2013
To check: you want A{1,1} to be added to each cell B{1,1}, B{1,2}, B{3,5} and so on? And you want A{1,2} the same, producing another set of answers? So the overall result should have numel(A) times numel(B) results, each 8 x 8 ?
What shape do you want the result to be? 4 dimensional? R{P,Q,R,S} = A{P,Q} + B{R,S} ?
I must admit that it is not obvious to me how such a computation would be of value.
Internazionale
Internazionale on 23 Jan 2013
yes, it's true. the output just one value. after the add operation, i want to sum it. example, A{1,1} to be added every cell B{1,1} and sum every pixel, so the final value is just one value.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!