representation of a cell array in 2025b
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
representation change of a cell array from 2024b to 2025b
for example I have all subfolder names from a folder in a cell array,
in 2024b i see the names of my folders but in 2025b I see this:
6×1 cell array
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
so the names are not visible any more in the cell array if it is an 1x1 cell.
are there some setting that could be changed that I see the content of the cells?
2 comentarios
Dyuman Joshi
el 14 de Oct. de 2025
How did you obtain these subfolder names? Did you use any code for doing so?
Stephen23
el 14 de Oct. de 2025
Editada: Stephen23
el 14 de Oct. de 2025
Dyuman Joshi asked the right question. More particularly, why are you nesting superfluous scalar cell arrays inside another cell array?
writematrix(pi,'somename.csv')
writematrix(23,'nextname.csv')
S = dir();
C = {S.name} % no superfluous nesting
The data design would be the obvious thing to fix:
D = cellfun(@(n){n}, C, 'uni',0) % superfluous nesting
Respuestas (2)
Star Strider
el 14 de Oct. de 2025
One option is to use the '{:}' representation to see the contents --
Names = {{'abc'},{'def'},{'ghi'},{'jklmnop'}}
Names{:}
.
0 comentarios
Steven Lord
el 14 de Oct. de 2025
If you have cells or structs inside of cells (as I suspect is the case in the original poster's question) you could use the celldisp function to recursively display the contents.
Names = {{'abc'},{'def'},{struct('abc', 'def'), 'ghi'},{'jklmnop', {1:5}}}
celldisp(Names)
0 comentarios
Ver también
Categorías
Más información sobre Structures en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!