Inverting each Submatrix of a Matrix
Show older comments
Hi
I have a matrix that is used to record submatrices, which are 2x2.
[A B C]
[D E F]
[G H I]
all are 2x2 and all these submatrices have to be inversed. I do not want to use for loop. Is there any way to do this efficiently?
Thanks
Answers (1)
Azzi Abdelmalek
on 27 Jun 2014
Edited: Azzi Abdelmalek
on 27 Jun 2014
If you have the image processing toolbox
im=randi(10,4)
out=blockproc(im,[2 2],@(x) inv(x.data))
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!