Problem 375. N-Dimensional Array Slice

Given an N-dimensional array, A, an index, I, and a dimension, d, return the I th elements of A in the d dimension.

For Example,

    array_slice( A, 5, 3 )

is equivalent to

    A(:,:,5)

Note: eval and str2func cannot be used. This is a Cody restriction.

Solution Stats

23.01% Correct | 76.99% Incorrect
Last Solution submitted on Nov 14, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers220

Suggested Problems

More from this Author56

Problem Tags

Community Treasure Hunt

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

Start Hunting!