Cody

Problem 1728. Transpose

Solution 1761932

Submitted on 26 Mar 2019 by Abdelfatah Teamah
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.8727 0.9578 0.4060 0.9978 0.6865 0.6112 0.1840 0.5885 0.9422 0.4170 0.0111 0.7370 0.5648 0.3071 0.4705 0.1299 0.3022 0.0659 0.3660 0.2437 0.1602 0.3412 0.6343 0.8650 0.5179 0.9833 0.1936 0.5263 0.3964 0.5807 0.6059 0.5727 0.2827 0.1417 0.8272 0.9305 0.9036 0.8010 0.6080 0.4076 0.0261 0.1206 0.0597 0.9347 0.8561 0.5284 0.3724 0.5852 0.3816 0.5693 0.4111 0.7604 0.6301

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