MATLAB Answers

Storing double output into a single cell array

15 views (last 30 days)
Charms on 22 Feb 2020
Commented: Charms on 22 Feb 2020
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};


Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 22 Feb 2020
zeros() to cell() and
A{n,k} = selectedlocal

  1 Comment

Charms on 22 Feb 2020
thank you madhan, almost completing my thesis analysis!

Sign in to comment.

More Answers (0)