aushah
Electrical
- Mar 7, 2014
- 1
Hi. I have a matrix of 768x1024. Now, within this matrix, I want to have a rectangle such that it is centered around the middle column of the matrix and has dimension (k)x1024, where k is a variable. This (k)x1024 rectangular portion within the 768x1024 matrix should have all entries 1 and the rest of the matrix entries should all be zero. So, it creates sort of a mask so that when I multiply it with another 768x1024 matrix, the result is only the rectangular part of the other matrix. All help is appreciated. Thanks.
ps: I am attaching a sketch of what I mean by what I said above.
ps: I am attaching a sketch of what I mean by what I said above.