select the first row in the matrix

I have a matrix named A and I want to get a new matrix B by pulling the first row of it.
Sample:
A:
[1,2,3;...
4,5,8;...
3.9.5];
B-matrix:
[1,2,3]
How can I do that?

Réponses (1)

KSSV
KSSV le 27 Mai 2022

2 commentaires

Yonca DOGU
Yonca DOGU le 27 Mai 2022
I want matrix A to stay constant as I will use it in other steps, print the first row in matrix A on matrix B pls
B = A(1,:)

Connectez-vous pour commenter.

Catégories

Tags

Commenté :

le 27 Mai 2022

Community Treasure Hunt

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

Start Hunting!

Translated by