how to read surrounding matrix elements following list of coordinates
answer to reddit.com matlab question
https://www.reddit.com/r/matlab/comments/4d1r6y/is_it_possible_to_convert_mutliple_local_regions
Q:
For example, if I have a 10×10 matrix, and I have a list of n coordinates in that matrix, I would like to take a 3×3 region surrounding each coordinate, resize it to be a length 9 vector, and then stack all the vectors into a 9×n matrix. I know I could write a for loop to do this but that seems gross, though probably what I'll end up doing.
Cite As
John BG (2024). how to read surrounding matrix elements following list of coordinates (https://www.mathworks.com/matlabcentral/fileexchange/56345-how-to-read-surrounding-matrix-elements-following-list-of-coordinates), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |