Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

getting it in a matrix?

1 visualización (últimos 30 días)
ck
ck el 4 de Mayo de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Say I have 1000 values in a single column, how can I transform them into matrix in which I get first 20 values in first row and next 20 in the next row and so on in 1 column. Like basically 1 column and 50 rows?

Respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 4 de Mayo de 2016
Editada: Azzi Abdelmalek el 4 de Mayo de 2016
reshape(A,20,[])'
  1 comentario
ck
ck el 5 de Mayo de 2016
row 1: 1 row 2: 199 row 3: 1 row 4: 199 ....... this is how the output I got is, how can I make it row 1: 1 199 row : 1 199??

CS Researcher
CS Researcher el 5 de Mayo de 2016
Let x be the column vector. Try this:
modifiedX = reshape(x,numel(x)/20,20)';

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by