Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
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))
|
4596 Solvers
Numbers with prime factors 2, 3 and 5.
166 Solvers
246 Solvers
Rotate input square matrix 90 degrees CCW without rot90
380 Solvers
117 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!