Convert tables to arrays in a for loop

1 visualización (últimos 30 días)
Nikolas Spiliopoulos
Nikolas Spiliopoulos el 16 de Oct. de 2018
Comentada: Nikolas Spiliopoulos el 19 de Oct. de 2018
hi there,
I have some tables named (data_1, data_2 ,data_3, data_4,data_5)
is it possible to convert them to arrays by using a for loop?
(Instead of doing it manually for each table separately)
thanks
Nikolas

Respuesta aceptada

Stephen23
Stephen23 el 16 de Oct. de 2018
C = {data_1, data_2 ,data_3, data_4,data_5};
D = cellfun(@table2array,C,'uni',0)

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion 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