Mapping a smaller matrix to a larger matrix
25 views (last 30 days)
Show older comments
Aaron DeSantis
on 23 Feb 2023
Commented: Aaron DeSantis
on 23 Feb 2023
I have a 4x4 matrix with indicies indicated around it (k). I want to map it to an 8x8 matrix based on thoes indicies to give me k'. See the image below for clarification. Is there a way to do it such that the indecies on the 4x4 matric and be any value from 1-8. For instance instead of 7812, use 4312 or 4378.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1304275/image.jpeg)
2 Comments
Dyuman Joshi
on 23 Feb 2023
How are the indices given to you? Or how are these indices provided to the code as input?
Jan
on 23 Feb 2023
A smarter example than only 1
K = [1,2,3,4; 5,6,7,8; 9,10,11,12; 13,14,15,16];
index1 = [7,8,1,2];
index2 = [7,8,1,2];
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Matrices and 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!