how i can change column vector into row vector??
조회 수: 48 (최근 30일)
이전 댓글 표시
n = [1 2 3 4 5]
n =
1 2 3 4 5
>> r = n'
r =
1
2
3
4
5
Then i want to change into row vector again??
댓글 수: 2
Aditya
2024년 6월 23일
To convert a column vector back into a row vector, use the transpose operation. Simply apply the transpose operator (') to the column vector to obtain the row vector.
Stephen23
2024년 6월 23일
"Simply apply the transpose operator (')..."
' is the operator for complex conjugate transpose: https://www.mathworks.com/help/matlab/ref/ctranspose.html
답변 (1개)
Torsten
2024년 6월 23일
편집: Torsten
2024년 6월 23일
Simply converting a row vector into a column vector needs the usual transpose operator which is .' You used only ' with is conjugate transpose. This will make a difference if the elements of the vector are complex numbers:
n = [1+1i,2-0.5*1i];
n'
n.'
To change the column vector into the original row vector, use .' again:
n = [1 2 3 4 5];
n.'
(n.').'
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!