Cody

Problem 42892. Transpose of matrix

Solution 3265153

Submitted on 18 Oct 2020 by Payam Morsali
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
x = 1; y_correct = 1; assert(isequal(tran_matrix(x),y_correct))

a = 0

2   Pass
x = [1 2]; y_correct = [1 2]'; assert(isequal(tran_matrix(x),y_correct))

a = 0 0

3   Pass
x = [1;2]; y_correct = [1 ;2]'; assert(isequal(tran_matrix(x),y_correct))

a = 0 0

4   Pass
x = [1; 2+3i]; y_correct = [1 2+3i]; assert(isequal(tran_matrix(x),y_correct))

a = 0 3 y = 1.0000 + 0.0000i 2.0000 + 3.0000i

Suggested Problems

More from this Author70

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!