Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
vector1 = [0 0 0 0 0 0 0 0 0 0];
vector1_correct = [2 4 8 16 32 64 128 256 512 1024];
code = textread('PowersOf.m', '%s');
assert(isequal(PowersOf(vector1), vector1_correct) && ...
strcmp(code(5), 'for') && ...
strcmp(code(end-7), 'end') && ...
strcmp(code(end-6), 'end'));
|
36409 Solvers
500 Solvers
Getting the indices from a vector
1449 Solvers
244 Solvers
Matlab Basics - y as a function of x
242 Solvers