I wanna save string data in my gui with txt format but I want to choose directory and file name in dialog box
1 次查看(过去 30 天)
显示 更早的评论
for example;
string=[100, 150, 200]
I want to save this data with .txt format in dialog box which enables me to choose directory and file name like uiputfile.
0 个评论
采纳的回答
David Sanchez
2013-5-22
[file_name PathName] = uigetfile('*.mat','Select *.mat file');
full_file_path = fullfile(PathName, file_name);
fid = fopen('my_txt_file.txt','w'); % open file for writting
fwrite(fid,full_file_path);
fclose(fid);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Low-Level File I/O 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!