How to create a text file and write text character by character using MATLAB? thanks in advance
You can create a text file using this command
fileID = fopen('my_file_name.txt','w');
if the file is existing and you wish to append a string to the end of the file use
fileID = fopen('my_file_name.txt','a');
and you can write a string using fprintf
my_string = 'hello world';
fprintf(fileID, '%s', my_string);
after you are done, close the file
fclose(fileID);
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加