Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Saving a Matlab Variable as a .dat text file with a header

$
0
0
Hi,

I have a variable in my workspace that is a <9583x5 double> and I wish to save it as a text *.dat file along with a 2 line header that resembles this:

TITLE = "Particle Test 5"
VARIABLES = "x", "y", "z", "t", "ID"

Do you guys have an idea of how I could go about doing this? Additionally I would like to be able to specify the file name and the root directory and folder where it gets saved but I think I can figure this out myself. Thanks!

Viewing all articles
Browse latest Browse all 19628

Trending Articles