필터 지우기
필터 지우기

How can i put in matrix data into cell array?

조회 수: 2 (최근 30일)
지원 정
지원 정 2022년 1월 12일
댓글: Stephen23 2022년 1월 13일
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
Stephen23
Stephen23 2022년 1월 13일
@지원 정: 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.

댓글을 달려면 로그인하십시오.

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2022년 1월 12일
Cell array
for i=1:length(matrix_data)
cell_data{i}=matrix_data;
end
  댓글 수: 4
KALYAN ACHARJYA
KALYAN ACHARJYA 2022년 1월 12일
편집: KALYAN ACHARJYA 2022년 1월 12일
@Stephen Thanks for detail explanation.
지원 정
지원 정 2022년 1월 12일
Thank you so much

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by