How to initialize a cell with all zero values in matlab?
5 次查看(过去 30 天)
显示 更早的评论
I want a cell array charstring whose every cell is initialized with {000000}. I tried using
charstring={0 0 0 0 0 0 };
but its not working.
0 个评论
回答(1 个)
KSSV
2017-6-16
编辑:KSSV
2017-6-16
charstring={'0' '0' '0' '0' '0' '0'};
Or
charstring = [repmat({'0'},1,6)] ;
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Other Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!