Cody

Solution 552515

Submitted on 6 Jan 2015
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   Fail
%% M=[1 2 2 5 2 5 2 3 4 6 4 6 3 4 6 1 5 7]; n=2; Result=[2 10 10 6 24 24 12 6 35 ]; assert(isequal(Multiply_Column(M,n),Result))

Error: Assertion failed.

2   Fail
%% M=[1 2 2 5 2 5 2 3 4 6 4 6 3 4 6 1 5 7]; n=3; Result= [ 4 50 24 144 72 35]; assert(isequal(Multiply_Column(M,n),Result))

Error: Assertion failed.

3   Fail
%% M=magic(16) n=4 Result=[388608 2635416 6683600 12348840 19339880 27714960 37191000 47608256 58813128 70658160 83002040 95709600 108732000 121781880 134826800 147756168 160465536 172856600 184837200 196321320 207181800 217443600 226987736 235752768 243683400 250730480 256851000 262008096 266185440 269325560 271428528 272482056 272480000 271422360 269315280 266171048 262026600 256873616 250757208 243714240 235787720 227026800 217486776 207229088 196269920 184781688 172796976 160401800 147688320 134754840 121705808 108651816 95793896 83090448 70750680 58909760 47709000 37295856 27823928 19452960 12231648 6562296 2510000 259080] assert(isequal(Multiply_Column(M,n),Result))

Error: Assertion failed.

4   Pass
%% M=ones(18) n=18 assert(isequal(Multiply_Column(M,n),ones(18,1)))

M = Columns 1 through 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 17 through 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 n = 18

Suggested Problems

More from this Author21