How to export script to text file ?
19 ビュー (過去 30 日間)
古いコメントを表示
hello please help me to export my code into .txt extension. Is it possible ?
i already tried this code, but it failed
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1643801/image.png)
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!