How can I write an output file .dat?

How can I write an output file(.dat) which containing a,t,y,z?

Answers (1)

you can use the save function in MATLAB.
for example:
x = randn(100,1);
save test.dat x -ascii
% or
save('c:\folderyouwant\test.dat','x','-ascii');

Products

Asked:

on 18 Mar 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!