Borrar filtros
Borrar filtros

omment rearranger une matrce long en une seul ligne

1 visualización (últimos 30 días)
alize beemiel
alize beemiel el 30 de Nov. de 2023
Comentada: alize beemiel el 30 de Nov. de 2023
hello
i have a long matrix with over 1000 line and 2 column
exemple
A=[16 3
5 10
9 6
4 15
2 13
11 8
7 12
14 1]
and i want restrut my matrix like this
b=[ 16 3 5 10 9 6 4 15 2 13 11 8 7 12 14 1]
some help please

Respuesta aceptada

Dyuman Joshi
Dyuman Joshi el 30 de Nov. de 2023
A=[16 3
5 10
9 6
4 15
2 13
11 8
7 12
14 1];
B = reshape(A.', 1, [])
ans = 1×16
16 3 5 10 9 6 4 15 2 13 11 8 7 12 14 1

Más respuestas (0)

Categorías

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