using imported txt file in neural network
1 次查看(过去 30 天)
显示 更早的评论
i imported txt file data in workspace to copy from it and past in the editor as :
x=[120 240 480 960 1920 ];
that what i want; but actually the numbers appears with many zeros and separated by comma
x=[120.00000000, 240.00000000, 480.00000000, 960.00000000, 1920.00000000]
i want to paste numbers as in the txt file and separated by space as matrix not with comma
0 个评论
回答(1 个)
Ameer Hamza
2020-9-22
编辑:Ameer Hamza
2020-9-22
Use writematrix()
x=[120 240 480 960 1920];
writematrix(x, 'filename.txt', 'Delimiter', ' ');
In older versions
dlmwrite('filename.txt', x, ' ');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!