I have 3*1 matrix in form of cell or string. I have to convert into mat. i have to convert into 3*1*20

2 visualizaciones (últimos 30 días)
Tcur =
Columns 1 through 2
[3x1 double] [3x1 double]
Columns 3 through 4
[3x1 double] [3x1 double]
Columns 5 through 6
[3x1 double] [3x1 double]
Columns 7 through 8
[3x1 double] [3x1 double]
Columns 9 through 10
[3x1 double] [3x1 double]
Columns 11 through 12
[3x1 double] [3x1 double]
Columns 13 through 14
[3x1 double] [3x1 double]
Columns 15 through 16
[3x1 double] [3x1 double]
Columns 17 through 18
[3x1 double] [3x1 double]
Columns 19 through 20
[3x1 double] [3x1 double]

Respuesta aceptada

Walter Roberson
Walter Roberson el 16 de Oct. de 2015
mat = cell2mat( reshape(Tcur,1,1,[]) );

Más respuestas (1)

Jos (10584)
Jos (10584) el 16 de Oct. de 2015
You can use comma-separated list expansion:
mat = cat(1, Tcur{:})

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by