Matrix which contains the values of an other matrix A at the given locations. - MATLAB Cody - MATLAB Central

Problem 762. Matrix which contains the values of an other matrix A at the given locations.

Difficulty:Rate

If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1];

yc = [1 2 1; 3 2 4];

A = [6 7 8 9; 10 11 12 13];

Produce the matrix B which contains the values of A at the locations given in xc and yc. Thus:

B = [6 7 6; 12 11 9];

Solution Stats

60.73% Correct | 39.27% Incorrect
Last Solution submitted on Feb 20, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers229

Suggested Problems

More from this Author10

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page