Cody

Solution 1727783

Submitted on 15 Feb 2019 by maeffchen
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.2774 0.7891 0.3842 0.6015 0.2188 0.8472 0.6904 0.4970 0.4724 0.8137 0.7138 0.9384 0.8812 0.7410 0.2548 0.5124 0.5495 0.4405 0.7005 0.5224 0.4452 0.8391 0.0553 0.2517 0.3381 0.1112 0.7704 0.4099 0.3103 0.9160 0.8943 0.2307 0.5886 0.0828 0.1534 0.4033 0.9553 0.7096

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