Storing double output into a single cell array

조회 수: 7 (최근 30일)
Cside
Cside 2020년 2월 22일
댓글: Cside 2020년 2월 22일
Hi, is there a way for me to store the output in a cell format, in a single matrix? I want to store each 'selectedlocal' as part of the cell array A. Right now, I have an error "conversion to double from cell is not possible".
Thank you!
A = zeros (9,8);
for k = 1:8
sesslocal = cell2mat(locationsacc(k));
for n = 1:9
selectedlocal = find(sesslocal ==n); %%always change sesslocal
A(n,k) = {selectedlocal};
end
end

채택된 답변

madhan ravi
madhan ravi 2020년 2월 22일
zeros() to cell() and
A{n,k} = selectedlocal
  댓글 수: 1
Cside
Cside 2020년 2월 22일
thank you madhan, almost completing my thesis analysis!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by