Cody

Solution 1874614

Submitted on 15 Jul 2019 by Steven Beumer
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.0585 0.0375 0.9208 0.2058 0.8042 0.8026 0.1903 0.4024 0.5447 0.8689 0.9500 0.8021 0.1728 0.5940 0.8327 0.0437 0.8474 0.1768 0.7259 0.2109 0.7129 0.1305 0.2554 0.4027 0.3483 0.0427 0.7081 0.2805 0.2865 0.9154 0.2856 0.9873 0.8487 0.1833 0.3030 0.3933 0.7770 0.8911 0.7154 0.0262 0.1628 0.5400 0.8115 0.3552

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