How can I replace a specific number (row/column) in .dat file
8 visualizzazioni (ultimi 30 giorni)
I need to use a .dat as an input, so I would like to replace specific row/column element (number) for each iteration. This element is located in the first column in which are numbers and letters (depending on the row), the other columns have only letters.
Do I need to change the file format to another one (.txt for instance), then make the replacement, and finally convert it to .dat again? Which options do I have?
I tried dlmwrite, fwrite and many others but unsuccessfully.
Thank you very much.
Laurent il 10 Lug 2014
It depends on how your data is stored in the .dat file.
If it is ASCII, you can load it using
Then you can do your replacements and save it using the save command.