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))
|
960 Solvers
Back to basics 25 - Valid variable names
253 Solvers
Matrix indexing with two vectors of indices
405 Solvers
Determine Whether an array is empty
561 Solvers
Set some matrix elements to zero
228 Solvers