Acquiring blocks of data
Show older comments
I have a 100x100 matrix (Matrix A) and ive been trying to get a matrix B. Where each cell in matrix B contains an array of all the value that surround the corresponding cell in Block A in terms of a block with size N (Lets say its 2 for now). The results should be matrix B which is 100x100 where each cell contain an array of the surrounding data points. I hope this makes sense.
I would appreciate any help
2 Comments
Voss
on 5 Jul 2020
Maybe an example A that's 5x5 or so and the corresponding output B (still assuming N == 2, say) would clarify exactly what you have in mind.
jonas
on 5 Jul 2020
What are you going to do with matrix B afterwards? Perhaps conv2 or blockproc functions could solve the problem without building matrix B.
Accepted Answer
More Answers (0)
Categories
Find more on Multidimensional Arrays 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!