How to transpose a row into a column?

조회 수: 1,309 (최근 30일)
andrew
andrew 2013년 11월 19일
답변: Imad Berjawi 2022년 11월 3일
I have a 384x32 matrix and I would like to transpose it so that the row is a column corresponding to the values on the row for example:
original table:
  • a 1,2,3,4,5,6,7,8,
  • b 9,10,11,12,13,14,15,16
  • c 17,18,19,20,21,22,23,24
  • d etc..
Desired outcome:
  • a 1
  • a 2
  • a 3
  • a 4
etc

답변 (3개)

Sean de Wolski
Sean de Wolski 2013년 11월 19일
A = A';
or
A = A.';

BSantos
BSantos 2013년 11월 19일
There is a function called transpose. Maybe it helps.

Imad Berjawi
Imad Berjawi 2022년 11월 3일
A=[7,4,2;3,5,6;-1,2,1]

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by