I want to extract all cell data inside

1 view (last 30 days)
Hi I want to extract all cell data inside matlab0 file, that is {b,q,s,r,n,p,t,o,w} I used the flatten function, but it extracts four data. Thank you for your help. Of course, if there is another solution, please let me know. Thank you
  3 Comments
Ali Nik
Ali Nik on 5 May 2023
I want to put all these characters in another cell

Sign in to comment.

Accepted Answer

Mathieu NOE
Mathieu NOE on 5 May 2023
hello
maybe this ?
result :
out = 1×9 cell array
{'o'} {'w'} {'t'} {'p'} {'n'} {'r'} {'b'} {'q'} {'s'}
out = nn;
while any(cellfun(@iscell,out))
out = [out{cellfun(@iscell,out)} out(~cellfun(@iscell,out))];
end

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!