Borrar filtros
Borrar filtros

column into row

4 visualizaciones (últimos 30 días)
Win Thomas Halim
Win Thomas Halim el 17 de Abr. de 2011
hi just a simple question here, so i got this code:
X=linspace(1,10,10);
Y=linspace(1,10,10);
[xx,yy]=meshgrid(X,Y);
as a result x and y 10 by 10 matrix. how should i do if i want to convert xx and yy to 100 by 1 matrix,so for example second row of xx occupied 1st row 11th to 20th column of xx, 3rd row occupied 1st row 21th to 30 th column, etc
thanks for the help! appreciate much!

Respuesta aceptada

bym
bym el 17 de Abr. de 2011
doc reshape()

Más respuestas (1)

Matt Tearle
Matt Tearle el 17 de Abr. de 2011
xcol = xx(:);
Although, if you want to go by rows, transpose xx first.

Categorías

Más información sobre Logical 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