replace one matrix with the positon indicated in another matrix
2 views (last 30 days)
Show older comments
I have two large matrices, for instance
A = [1 3 3 4];
B = [1 2 3 4 ; 5 6 7 8 ; 9 10 11 12 ; 13 14 15 16 ] ;
matrix A represents the postion of numbers of matrix B.
Now how to write B as:
B = [1 3 3 4 ; 5 7 7 8 ; 9 11 11 12; 13 15 15 16];
0 Comments
Accepted Answer
More Answers (1)
KSSV
on 19 Nov 2018
A = [1 3 3 4];
B = [1 2 3 4 ; 5 6 7 8 ; 9 10 11 12 ; 13 14 15 16 ] ;
B(:,2) = B(:,2)+1 ;
See Also
Categories
Find more on Image Processing Toolbox 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!