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

1510 Solutions

283 Solvers

Last Solution submitted on Feb 19, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...