making two columns from a row vector

2 visualizaciones (últimos 30 días)
cgo
cgo el 12 de Jul. de 2018
Comentada: Walter Roberson el 12 de Jul. de 2018
I have a row vector of size 1 x 600;
I want to create a two column vector such that elements 1 and 2 of the row vector are in row 1; elements 3 and 4 are in row 2; and so on.
Please help

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Jul. de 2018
output = reshape(YourVector, 2, []) .' ;
  2 comentarios
cgo
cgo el 12 de Jul. de 2018
What is the . for? That is what I miss. Thanks
Walter Roberson
Walter Roberson el 12 de Jul. de 2018
The ' operator is "conjugate transpose", equivalent to
transpose(conj(DATA))
The .' operator is transpose without taking the complex conjugate, identical to calling transpose() without conj()

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by