Cody

Solution 1931079

Submitted on 11 Sep 2019 by Shiv010
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));

l = 31 a = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0.4769 0 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0.4769 0.2562 0 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0.4769 0.2562 0.1140 0 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0.4769 0.2562 0.1140 0.3199 0 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0.4769 0.2562 0.1140 0.3199 0.2946 0 0 0 0 a = 0.5369 0.3033 0.5055 0.5876 0.7878 0.1043 0.5216 0.7546 0.0426 0.6919 0.4060 0.0111 0.8323 0.2327 0.4509 0.7099 0.6098 0.6971 0.9795 0.5734 0.0033 0.0322 0.4769 0.2562 0.1140 0.3199 0.2946 0.3653 0 0 0 a = 0.5369 ...

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