Cody

Solution 284815

Submitted on 18 Jul 2013 by Cem
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.7947 0.5449 0.6862 0.8936 0.0548 0.3037 0.0462 0.1955 0.7202 0.7218 0.8778 0.5824 0.0707 0.9227 0.8004 0.2859 0.5437 0.9848 0.7157 0.8390 0.4333 0.4706 0.5607 0.2691 0.7490 0.5039 0.6468 0.3077 0.1387 0.4756 0.3625 0.7881 0.7803 0.6685 0.1335 0.0216 0.5598 0.3008 0.9394 0.9809 0.2866 0.8008 0.8961 0.5975 0.8840 0.9437 0.5492 0.7284 0.5768 0.0259 0.4465 0.6463 0.5212 0.3723 0.9371 0.8295 0.8491 0.3725 0.5932 0.8726 0.9335 0.6685 0.2068 0.6539 0.0721 0.4067 0.6669 0.9337 0.8110 0.4845 0.7567 0.4170 0.9718 0.9880

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