Cody

Solution 1916256

Submitted on 30 Aug 2019 by Abbie Lund
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.5041 0.7367 0.2901 0.9769 0.1943 0.1175 0.4817 0.2681 0.2955 0.6724 0.5407 0.0146 0.5902 0.0801 0.1994 0.8837 0.1982 0.3591 0.1180 0.4725 0.0674 0.3847 0.8701 0.6663 0.0411 0.3369 0.4785 0.4551 0.7620 0.3087 0.6390 0.8912 0.7036 0.4996 0.8962 0.4235 0.9094 0.9157 0.3535 0.1495 0.2149 0.0152 0.0736 0.2093 0.4829 0.9691 0.7173 0.9359 0.4066 0.6077 0.3636 0.7191 0.8172 0.0862 0.8495 0.1111 0.9988 0.9302 0.3382 0.9090 0.1770 0.8948 0.9652 0.7394 0.8289 0.6329 0.6182

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');