How do I repair the eror?
1 次查看(过去 30 天)
显示 更早的评论
#How do I repair the error?
z=Y(1,j)
zz=cellstr(z)
0 个评论
回答(1 个)
Rik
2023-4-22
You need to make sure each element of the cell array is a char vector. Since currently the second one is a cell, you need to unpack it. The code below should result in a cellstr.
z=Y(1,j)
zz=[z(1) z{2}];
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!