Cody

Solution 1150254

Submitted on 30 Mar 2017 by margreet docter
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.9407 0.1039 0.4289 0.9850 0.7312 0.1071 0.9737 0.3670 0.3333 0.4558 0.8610 0.4676 0.3024 0.0061 0.2426 0.0474 0.6327 0.2626 0.3652

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