Cody

Solution 893081

Submitted on 21 May 2016 by ENGSADI
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.2890 0.9038 0.4867 0.8409 0.8689 0.2412 0.4409 0.5980 0.0819 0.5717 0.5219 0.8870 0.9469 0.0665 0.9319 0.8718 0.7007 0.3321 0.4104 0.2114 0.6864 0.1552 0.9649 0.0899 0.0249 0.7558 0.7147 0.4188 0.2169 0.8958 0.0167 0.5552 0.8775 0.0854 0.6350 0.8258 0.3267 0.8876 0.6728 0.5473 0.5400 0.3020 0.7892 0.8901 0.0098 0.5299 0.1963 0.9983 0.5310 0.6599 0.7330 0.9795 0.1117 0.7277 0.6985 0.7340 0.9766 0.8370 0.0233 0.1915 0.2955 0.7926 0.0894

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