Cody

Solution 1896644

Submitted on 10 Aug 2019 by Philippe
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.9849 0.6611 0.2922 0.9822 0.1109 0.1885 0.8113 0.0811 0.5105 0.0787 0.7737 0.3019 0.8548 0.8420 0.3714 0.0358 0.0095 0.7685 0.5917 0.9427 0.0449 0.5988 0.5251

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');

Suggested Problems

More from this Author1