how to create column vector

조회 수: 9 (최근 30일)
Ivan Tulic
Ivan Tulic 2020년 4월 12일
댓글: Jackson 2023년 10월 16일
So I need to create a matrix were first column of the matrix is 30 rows of the first column vector then second column of the matrix is also 30 rows of second column vector and same for the third column of the matrix which is also 30 rows of the third vector. Is there a very simple command for that beacuse i simply can't find. And also is it possible to export my matrix to excell on matlab online.
  댓글 수: 4
Ivan Tulic
Ivan Tulic 2020년 4월 12일
Sorry, maybe i wrote it wrong but i have 3 matrixes for example each is 30x1 and i need to use those three to create a fourth but fourth needs to be create in the way that in the first column i need to have 3 rows of the first matrix and so for second and the third row.
the cyclist
the cyclist 2020년 4월 12일
@IA -- I certainly didn't state my confusion very clearly, did I? :-)
But this seems to have been resolved, so I won't bother trying again.

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

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 12일
From your question, it appears that you want to concatenate the matrix. In MATLAB, square brackets [ ] are used for concatenation. See this example: https://www.mathworks.com/help/matlab/math/creating-and-concatenating-matrices.html#OverviewCreatingAndConcatenatingExample-3
v1 % 30x1 vector
v2 % 30x1 vector
v3 % 30x1 vector
V = [v1 v2 v3];
  댓글 수: 3
Ameer Hamza
Ameer Hamza 2020년 4월 12일
Thanks for adding the additional note.
Ivan Tulic
Ivan Tulic 2020년 4월 12일
It worked thanks for the help

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

추가 답변 (1개)

venkata ganesh nalajala
venkata ganesh nalajala 2021년 2월 1일
Create a variable x that contains the value in the 6th row and 3rd column of the variable data.

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by