How to put a name on each double variable in a cell array"

조회 수: 5 (최근 30일)
Fan Yang
Fan Yang 2020년 3월 12일
편집: James Tursa 2020년 3월 12일
Hi guys,
I am trying to load all the data, as a numberic array, into a cell array K, but I wand to be able to identity which file the data came from which require me to name all numeric array in the cell array. How can I do that?

채택된 답변

James Tursa
James Tursa 2020년 3월 12일
You could have an associated cell array for the file names. E.g.,
fnames{i,j} = fn;
  댓글 수: 2
Fan Yang
Fan Yang 2020년 3월 12일
편집: Fan Yang 2020년 3월 12일
Would that require me to create a seperate cell array? It would be great if all the data and associated names are in the same cell array.
Best,
Fan Yang
James Tursa
James Tursa 2020년 3월 12일
편집: James Tursa 2020년 3월 12일
K{i,j,1} = t; % although K{i,j} = t will do the same thing
K{i,j,2} = fn;

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by