wkeep2 - two dimensional signal extraction
This function extracts matrix from an input matrix at the center. Row and Column information should be provided to determine the position. When the size is not evenly given, for example, odd from even or even from odd, the matrix would be an element aligned to the right and lower corner.
-->a=[1 2 3 4 5 6;7 8 9 10 11 12;13 14 15 16 17 18]; -->a a = ! 1. 2. 3. 4. 5. 6. ! ! 7. 8. 9. 10. 11. 12. ! ! 13. 14. 15. 16. 17. 18. ! -->b=wkeep2(a,3,2) b = ! 3. 4. ! ! 9. 10. ! ! 15. 16. ! -->b=wkeep2(a,2,2) b = ! 9. 10. ! ! 15. 16. ! -->b=wkeep2(a,2,3) b = ! 9. 10. 11. ! ! 15. 16. 17. !