Cody

Solution 1811210

Submitted on 9 May 2019 by Michael Battye
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.5249 0.2279 0.7202 0.0070 0.0531 0.6286 0.4615 0.7358 0.2528 0.4295 0.0241 0.8434 0.8495 0.6450 0.3796 0.1276 0.3692

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