This is related to the post
display all elements in a nested cell array (with character entries)
with a change where entries are characters. A new question was asked for clarity.
Now :
a =
{1x10 cell} {1x10 cell} {1x10 cell} {1x10 cell}
a{:}=
ans = [0] [0.4000] [0] [0] [0] [0] [0] [0] [0] [0]
ans = [0] [0] [0.2000] [0] [0.2000] [0] [0.2000] [0] [0] [0]
ans = [0] [0] [0] [0] [0] [0.2000] [0] [0] [0.2000] [0.2000]
ans = [0] [0.2000] [0] [0] [0] [0] [0] [0.4000] [0] [0.2000]
the answer to the previous was:
fileID = fopen('a.txt', 'at');
fprintf(fileID, '%2.8s \n', cellfun(@(x) char(x), a));
fclose(fileID);
How to solve it now? want to print:
0 0.4 0 0 0 0 0 0 0 0
0 0 0.2 0 0.2 0 0.2 0 0 0
.
.
thanks