Problem 375. N-Dimensional Array Slice
Solution Stats
Problem Comments
-
7 Comments
What test 3 means???
The question is simple yet really well thought. One of my very fundamental concepts got clarified after solving this problem.
Please, edit the problem to make it clear 'eval' cannot be used.
I think same like Fulaninho de Tal, You need edit the problem and it clear 'eval' and 'str2func' cannot be used.
How do do want to handle when the index is bigger than the size of the array? In solution 2 or 3 you enter a 5x5 array, but request slice index 10.
i like it
Massimo Zanetti & Kevin Hellemans: in Test 3 the value 10 is entered as the dimension argument (not the index argument, which has a value of 1).
Thus in Test 3 the general solution would be A(:, :, :, :, :, :, :, :, :, 1).
—DIV
Solution Comments
-
2 Comments
Cheat 'solution' by Raghunadh N.
Rescored.
-
1 Comment
the problem needs more explanation
Problem Recent Solvers154
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2565 Solvers
-
Project Euler: Problem 7, Nth prime
1022 Solvers
-
Back to basics - mean of corner elements of a matrix
333 Solvers
-
Natural numbers in string form
761 Solvers
-
String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
817 Solvers
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!