Save signal as .dat file

265 visualizzazioni (ultimi 30 giorni)
hajer il 28 Dic 2011
Commentato: Hafsa Asad il 18 Dic 2018
Hi , i have signal and i want to save it after modified(save as .dat ) how i can do that ?
  1 Commento
Walter Roberson
Walter Roberson il 28 Dic 2011
There is no standard format for .dat files. .dat is used as an extension to indicate data files in some format that is private or unique to the program. Usually .dat is a binary format that would have to be written using the low level I/O routines.
We would have to know the exact internal format used by whatever program you would be reading this in with.

Accedi per commentare.

Risposte (2)

Wayne King
Wayne King il 28 Dic 2011
x = randn(100,1);
save test.dat x -ascii
% or
save supports other options as well.
  2 Commenti
Walter Roberson
Walter Roberson il 28 Dic 2011
When you use the () form of save, the first parameter can be a variable name that contains the file name. For example
UserFile = 'c:\folderyouwant\test.dat';
save(UserFile, 'x', '-ascii')

Accedi per commentare.

Hafsa Asad
Hafsa Asad il 22 Mar 2015
dlmwrite('myfile.dat', my_matrix_vals)
  2 Commenti
Hafsa Asad
Hafsa Asad il 18 Dic 2018
my pleasure : )

Accedi per commentare.


Scopri di più su Data Import and Analysis in Help Center e File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by