Save signal as .dat file

198 Ansichten (letzte 30 Tage)
hajer
hajer am 28 Dez. 2011
Kommentiert: Hafsa Asad am 18 Dez. 2018
Hi , i have signal and i want to save it after modified(save as .dat ) how i can do that ?
  1 Kommentar
Walter Roberson
Walter Roberson am 28 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Wayne King
Wayne King am 28 Dez. 2011
x = randn(100,1);
save test.dat x -ascii
% or
save('c:\folderyouwant\test.dat','x','-ascii');
save supports other options as well.
  2 Kommentare
hajer
hajer am 28 Dez. 2011
thank you ,but i do not know the name of file because the name of file is entrance by the user
Walter Roberson
Walter Roberson am 28 Dez. 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')

Melden Sie sich an, um zu kommentieren.


Hafsa Asad
Hafsa Asad am 22 Mär. 2015
dlmwrite('myfile.dat', my_matrix_vals)
  2 Kommentare
andy wen
andy wen am 10 Apr. 2017
thank you ;)
Hafsa Asad
Hafsa Asad am 18 Dez. 2018
my pleasure : )

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by