Cody

Problem 2539. Add one raw in given matrix as shown in example

Solution 1847430

Submitted on 12 Jun 2019 by Noriko HOUNOKI
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
A=[1 0;0 1]; X=[3 5]; y_correct = [1 0; 0 1;3 5]; assert(isequal(Add_row(A,X),y_correct))

2   Pass
A=[1 0 0;0 1 0 ]; X=[1 2 3]; y_correct = [1 0 0;0 1 0;1 2 3]; assert(isequal(Add_row(A,X),y_correct))

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!