How to export script to text file ?
20 次查看(过去 30 天)
显示 更早的评论
hello please help me to export my code into .txt extension. Is it possible ?
i already tried this code, but it failed
0 个评论
采纳的回答
Dyuman Joshi
2024-3-16
export() does not support writing data into files.
a = "good";
b = "morning";
c = "babynumber";
d = 1:10;
%Simplified/vectorized method
str = a + b + c + string(d.')
%write the variable into a txt file
%change the file name as per your liking
writematrix(str, 'Filename.txt')
%checking the contents of the file
type('Filename.txt')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!