How can i put in matrix data into cell array?

1 visualización (últimos 30 días)
지원 정
지원 정 el 12 de En. de 2022
Comentada: Stephen23 el 13 de En. de 2022
This is the matrix data extracted from my csv.
I want to put these data in each row of cell array. How should I write the code?
This is example, I want to make a cell like this.
  1 comentario
Stephen23
Stephen23 el 13 de En. de 2022
@지원 정: you did not tell us the most important information: how did you get all of these variables into the workspace?
Rather than writing bad code to try and fix that very bad data design (lots of separate numbered variables), by far the best solution is to avoid getting into this situation in the first place. We can help you do that, if you tell us how those variables got into the workspace in the first place: I doubt that you wrote them all by hand.

Iniciar sesión para comentar.

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 12 de En. de 2022
Cell array
for i=1:length(matrix_data)
cell_data{i}=matrix_data;
end
  4 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 12 de En. de 2022
Editada: KALYAN ACHARJYA el 12 de En. de 2022
@Stephen Thanks for detail explanation.
지원 정
지원 정 el 12 de En. de 2022
Thank you so much

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by