Displaying a group of vectors on separate lines

조회 수: 14 (최근 30일)
Aleem Andrew
Aleem Andrew 2021년 2월 26일
답변: the cyclist 2021년 2월 26일
I am trying to display a number of vectors in separate lines. How can you create a matrix with each its rows equal to one a group of 1*n vectors? Alternately, can you use the display function to do this? I have tried using for example the command disp([a b]) but this displays the vectors all on a single line.
a = [1 2 3]; b = [4 5 6]; c = [4 5 6];
disp([a b c])

채택된 답변

the cyclist
the cyclist 2021년 2월 26일
You can use a semicolon to concatenate vertically
[a; b; c]

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by