Cody

Solution 1737712

Submitted on 27 Feb 2019 by ESSRA EMHIDI
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.0051 0.6801 0.2111 0.0926 0.1491 0.3329 0.3139 0.3428 0.3534 0.1006 0.0067 0.6747 0.2300 0.3969 0.5509 0.2664 0.6719 0.1366 0.0225 0.2029 0.5316 0.5680 0.9274 0.4951 0.3804 0.9513

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