Error combining two text files
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I followed the solution provided by Fangjun in the following Matlab Answer:
My problem is that 1 of the names of the text files is a variable (since it is taken from user input). I tried the following, but it cannot find the file.
>> header = 'A1.txt';
>> system('copy header+ATEST.txt') %assuming ATEST.txt exist
This is what Matlab displays:
The system cannot find the file specified.
ans = 1
I also tried the following but it gave me an error:
>> system('copy %s+ATEST.txt',header)
Error using system
Unrecognized option: A1.txt
Is there a way to work around this?
Thank you in advance for any help provided.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!