Put specific name in file via writematrix
17 次查看(过去 30 天)
显示 更早的评论
I want to create an output file. I would like my file to contains also one specific string (character) in its name.
My code is:
%A is a matrix (100x1 double)
str='2020'
writematrix(A,'output' str '.xlsx')
But command writematrix shows me error.
Could you please help me?
0 个评论
采纳的回答
the cyclist
2021-2-27
编辑:the cyclist
2021-2-27
You need to concatenate the character arrays. Here is one way to do that:
str='2020'
writematrix(A,['output',str,'.xlsx'])
1 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!