Storing double output into a single cell array

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 日

1 投票

zeros() to cell() and
A{n,k} = selectedlocal

1 件のコメント

Cside
Cside 2020 年 2 月 22 日
thank you madhan, almost completing my thesis analysis!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Type Conversion についてさらに検索

質問済み:

2020 年 2 月 22 日

コメント済み:

2020 年 2 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by