Cody

Problem 1728. Transpose

Solution 1533788

Submitted on 18 May 2018 by Alexander Oleschuk
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.2940 0.5554 0.6261 0.3428 0.7844 0.7995 0.0644 0.2533 0.0659 0.3830 0.5838 0.2876 0.5244 0.2786 0.7461 0.1551 0.4923 0.2792 0.0336 0.7980 0.8269 0.7232 0.8496 0.0609 0.4650 0.8597 0.6666 0.0014 0.6578 0.4039 0.0594 0.0571 0.8065 0.8941 0.2545 0.9786 0.5086 0.7611 0.2230

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