필터 지우기
필터 지우기

converting vector to matrix

조회 수: 1 (최근 30일)
zina ben
zina ben 2012년 6월 27일
Hello!
I want to convert vector:
V = [1 2 3 4 5 6 7 8 9]
To
V1 = [ 1 2 3; 4 5 6; 7 8 9 ]
Is there a Matlab command that will let me do this? or this needs to be coded? pleas help me Thanks in advence

답변 (1개)

Tom
Tom 2012년 6월 27일
doc reshape
in this case:
V1=reshape(V,3,3)
  댓글 수: 3
Tom
Tom 2012년 6월 27일
That's the last time I answer a question without having Matlab open.
Sean de Wolski
Sean de Wolski 2012년 6월 27일
@Tom, MATLAB Answers law 1:
-If you post something on MATLAB Answers without checking it, it will contain a typo!

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by