Lets say I have an array of size (10,1);
I want to divide it into the num number of blocks which are given by user
no_of_blocks=2;
output should be lower and upper limits of blocks
output_blocks=[1 5;6 10]
another example
array of size (1,36) divide into 7 blocks
output should be [1 7; 8 14; 15 21; 22 28; 29 35]
that is reject the remaining indices if it is not in the last block;
input arguments for the function are length of an array and no of blocks required.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers31
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
52725 Solvers
-
Find the maximum number of decimal places in a set of numbers
3376 Solvers
-
Create a vector whose elements depend on the previous element
787 Solvers
-
MATCH THE STRINGS (2 CHAR) very easy
301 Solvers
-
540 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!