How can I copy two rows

Let, A=[1 3 5;8 2 9;0 6 1] how to get B=[1 3 5;8 2 9]

Answers (1)

Cedric
Cedric on 21 Mar 2013
Edited: Cedric on 21 Mar 2013
B = A(1:2,:) ;
or
B = A([1,2],:) ;

Categories

Find more on Modeling in Help Center and File Exchange

Tags

Asked:

on 21 Mar 2013

Community Treasure Hunt

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

Start Hunting!