Cody

Solution 1041047

Submitted on 31 Oct 2016 by Sofiya Onyshkevych
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.4970 0.3483 0.1530 0.7167 0.8522 0.8025 0.3957 0.0935 0.0220 0.6942 0.8828 0.5730 0.7275 0.3784 0.9468 0.5172 0.0111 0.5636 0.6169 0.6807 0.9220 0.8028 0.0049 0.0629 0.3544 0.5117 0.1325 0.7153 0.3728 0.0013 0.8480 0.0099 0.2066 0.0060 0.2476 0.1556 0.2206 0.1471 0.5074 0.2285 0.3168 0.7984 0.7624 0.4573 0.8977 0.1636

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

More from this Author1