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?

답변 (1개)

KSSV
KSSV 2022년 5월 27일

1 개 추천

댓글 수: 2

Yonca DOGU
Yonca DOGU 2022년 5월 27일
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,:)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Aerospace Blockset에 대해 자세히 알아보기

태그

질문:

2022년 5월 27일

댓글:

2022년 5월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by