-
1 Comment
Karthik Raja Arumugam
on 12 Feb 2014
Test 5;
a = [ 0 1 2 1; 0 2 1 1];
c = 1;
a(1, :) = 0*.25+1*.10+ 2*0.05 + 1*0.01 = $ 0.21
a(2, :) = 0*.25+2*.10+ 1*0.05 + 1*0.01 = $ 0.26
so, output should be 2...
Similarly, for Test 6 is wrong
a(1, :) = $ .10;
a(2, :) = $ .05;
so output should be 1
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!