Cody

Solution 1839480

Submitted on 5 Jun 2019 by Yuzhu Zhang
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.8567 0.1047 0.8258 0.1020 0.4428 0.2038 0.5232 0.4483 0.0534 0.8404 0.9514 0.8242 0.9533 0.4907 0.2413 0.6086 0.2048 0.2627 0.1189 0.7914 0.5091 0.4880 0.1771

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