Cody

# Problem 2530. Powers Of

Solution 561722

Submitted on 21 Jan 2015 by Zikobrelli
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   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'));

ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024 ans = Columns 1 through 8 2 4 8 16 32 64 128 256 Columns 9 through 10 512 1024