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?

Respuestas (1)

KSSV
KSSV el 27 de Mayo de 2022

2 comentarios

Yonca DOGU
Yonca DOGU el 27 de Mayo de 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
KSSV
KSSV el 27 de Mayo de 2022
B = A(1,:)

Iniciar sesión para comentar.

Categorías

Más información sobre Aerospace Blockset en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Mayo de 2022

Comentada:

el 27 de Mayo de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by