Cody

# Problem 626. Make blocks of color

Solution 2497832

Submitted on 8 Jun 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
blockSize = 2; numColBlocks = 6; numRowBlocks = 4; RGBvec = spring(numColBlocks*numRowBlocks)*255; y_correct(:,:,1) =[ 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255]; y_correct(:,:,2) = [ 0 0 11 11 22 22 33 33 44 44 55 55 0 0 11 11 22 22 33 33 44 44 55 55 67 67 78 78 89 89 100 100 111 111 122 122 67 67 78 78 89 89 100 100 111 111 122 122 133 133 144 144 155 155 166 166 177 177 188 188 133 133 144 144 155 155 166 166 177 177 188 188 200 200 211 211 222 222 233 233 244 244 255 255 200 200 211 211 222 222 233 233 244 244 255 255]; y_correct(:,:,3) = [ 255 255 244 244 233 233 222 222 211 211 200 200 255 255 244 244 233 233 222 222 211 211 200 200 188 188 177 177 166 166 155 155 144 144 133 133 188 188 177 177 166 166 155 155 144 144 133 133 122 122 111 111 100 100 89 89 78 78 67 67 122 122 111 111 100 100 89 89 78 78 67 67 55 55 44 44 33 33 22 22 11 11 0 0 55 55 44 44 33 33 22 22 11 11 0 0]; assert(isequal(makeColorBlocks(blockSize, numColBlocks, numRowBlocks, RGBvec),y_correct))

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!