Borrar filtros
Borrar filtros

How can i create cell array from matrix?

2 visualizaciones (últimos 30 días)
Volcano
Volcano el 21 de Dic. de 2022
Editada: Stephen23 el 21 de Dic. de 2022
Hi,
I am trying to convert my matrix to cell array which contains 2 rows and 1 column. Each cell should have x_set vector. How can i do this?
Thanks,
noP = 2;
x_set = [50 44 0.03 0.13];
x_set_mat = repmat(x_set,noP,1)

Respuesta aceptada

Stephen23
Stephen23 el 21 de Dic. de 2022
Editada: Stephen23 el 21 de Dic. de 2022
noP = 2;
x_set = [50,44,0.03,0.13];
C = repmat({x_set},noP,1)
C = 2×1 cell array
{[50 44 0.0300 0.1300]} {[50 44 0.0300 0.1300]}

Más respuestas (0)

Categorías

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