How do I calculate differences in one column for specific pairs of rows (whose index are listed in another matrix)?
Show older comments
I've got a matrix A with two columns (mx2). Each row is a pair of row indices for another matrix B.
e.g. A = [1 3 ; 5 8 ; 11 15 ; ... ] means that row 1 and 3 of matrix B are one pair.
I need to calculate the difference in column 11 of matrix B for all pairs of rows given in A. Any ideas?
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings 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!