I want to extract all cell data inside

2 次查看(过去 30 天)
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

采纳的回答

Mathieu NOE
Mathieu NOE 2023-5-5
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by