Cody

Solution 302599

Submitted on 12 Aug 2013 by Chintan
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
%% n = ceil(100*rand()); v = rand(1,n); v_correct = v'; assert(isequal(question(v),v_correct));
myAns = 0.7197 0.7333 0.0039 0.4743 0.4286 0.3426 0.3629 0.5467 0.8874 0.4999 0.0559 0.7229 0.5098 0.4622 0.0880 0.4416 0.3341 0.2894 0.9391 0.4874 0.7866 0.7424 0.5215 0.5796 0.2169 0.5617 0.5622 0.1936 0.0962 0.1630
2   Pass
%% fid = fopen('question.m'); line1=fgetl(fid); line2=fgetl(fid); line3=fgetl(fid); fclose(fid); assert(strcmp('function myAns = question(v)',line1),'Only change the lines you are asked to'); assert(strcmp(' %%%%%',line2),'Only change the lines you are asked to'); assert(strcmp(' %%%%% Place your code below. DO NOT change anything outside the region %%%%',line3),'Only change the lines you are asked to');