Cody

Solution 181709

Submitted on 26 Dec 2012 by Khaled Hamed
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
%% v=[10^8 10^7 10^6 10^5 10^4 10^3 100 10 1]; pcoef='103050709'; mcoef='010203040'; sum = 92847669; assert(isequal(linear_vec_sum(v, pcoef, mcoef),sum))
2   Pass
%% v=[5 2 8]; pcoef='840'; mcoef='006'; sum = 0; assert(isequal(linear_vec_sum(v, pcoef, mcoef),sum))
3   Pass
%% v=[12 6 16]; pcoef='110'; mcoef='001'; sum = 2; assert(isequal(linear_vec_sum(v, pcoef, mcoef),sum))