Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1:5;
arr_corr = [30, 42, 66, 70, 78];
assert(isequal(sphenic_seq(n),arr_corr))
table =
Columns 1 through 30
30 42 66 70 78 102 105 110 114 130 138 154 165 170 174 182 186 190 195 222 230 231 238 246 255 258 266 273 282 285
Columns 31 through 53
286 290 310 318 322 345 354 357 366 370 374 385 399 402 406 410 418 426 429 430 434 435 438
|
2 | Pass |
n = 1:10;
arr_corr = [30, 42, 66, 70, 78, 102, 105, 110, 114, 130];
assert(isequal(sphenic_seq(n),arr_corr))
table =
Columns 1 through 30
30 42 66 70 78 102 105 110 114 130 138 154 165 170 174 182 186 190 195 222 230 231 238 246 255 258 266 273 282 285
Columns 31 through 53
286 290 310 318 322 345 354 357 366 370 374 385 399 402 406 410 418 426 429 430 434 435 438
|
3 | Pass |
n = 3:7;
arr_corr = [66, 70, 78, 102, 105];
assert(isequal(sphenic_seq(n),arr_corr))
table =
Columns 1 through 30
30 42 66 70 78 102 105 110 114 130 138 154 165 170 174 182 186 190 195 222 230 231 238 246 255 258 266 273 282 285
Columns 31 through 53
286 290 310 318 322 345 354 357 366 370 374 385 399 402 406 410 418 426 429 430 434 435 438
|
4 | Pass |
n = 20:30;
arr_corr = [222 230 231 238 246 255 258 266 273 282 285];
assert(isequal(sphenic_seq(n),arr_corr))
table =
Columns 1 through 30
30 42 66 70 78 102 105 110 114 130 138 154 165 170 174 182 186 190 195 222 230 231 238 246 255 258 266 273 282 285
Columns 31 through 53
286 290 310 318 322 345 354 357 366 370 374 385 399 402 406 410 418 426 429 430 434 435 438
|
5 | Pass |
n = 1:53;
arr_corr = [30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 345, 354, 357, 366, 370, 374, 385, 399, 402, 406, 410, 418, 426, 429, 430, 434, 435, 438];
assert(isequal(sphenic_seq(n),arr_corr))
table =
Columns 1 through 30
30 42 66 70 78 102 105 110 114 130 138 154 165 170 174 182 186 190 195 222 230 231 238 246 255 258 266 273 282 285
Columns 31 through 53
286 290 310 318 322 345 354 357 366 370 374 385 399 402 406 410 418 426 429 430 434 435 438
|
6 | Pass |
i1 = randi(20,1);
n = i1:(i1+randi(25,1));
arr_tot = [30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 345, 354, 357, 366, 370, 374, 385, 399, 402, 406, 410, 418, 426, 429, 430, 434, 435, 438];
arr_corr = arr_tot(n);
assert(isequal(sphenic_seq(n),arr_corr))
table =
Columns 1 through 30
30 42 66 70 78 102 105 110 114 130 138 154 165 170 174 182 186 190 195 222 230 231 238 246 255 258 266 273 282 285
Columns 31 through 53
286 290 310 318 322 345 354 357 366 370 374 385 399 402 406 410 418 426 429 430 434 435 438
|
Find the two most distant points
1236 Solvers
1208 Solvers
Getting the indices from a vector
1446 Solvers
322 Solvers
112 Solvers