As the following code shown, there will always be an error saying "Unexpected MATLAB expression" for the first "num2str" in the row defining filename. Please, help me!!!
WeChat Screenshot_20190114165317.png

 采纳的回答

The ‘filename’ assignment in your code is not the correct syntax.
It should be:
filename = ['A',num2str(kk),'.dat'];
Note the square brackets [], and not parentheses ().
However, using the sprintf function is preferable:
filename = sprintf('A%d.dat', kk);
I would use that instead.

2 个评论

Problem solved. Thank you so much!!
As always, my pleasure!

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by