From: Awusi Kavuma on
Hello there,

I am working with matrix data, that I can save as an ascii file for analysis out of Matlab using: dlmwrite('data_ascii', data_ori, '\t',0,0)
where data_ori is the original data and data_ascii is the created ascii file data.

Is there a way how I can automatically add on top of the file data that is in form of text? The data I want to add is about 10 lines of text.

Kindly help

Regards

Kavuma
From: Rune Allnor on
On 4 Feb, 14:35, "Awusi Kavuma" <kavumaw...(a)yahoo.com> wrote:
> Hello there,
>
> I am working with matrix data, that I can save as an ascii file for analysis out of Matlab using:  dlmwrite('data_ascii', data_ori, '\t',0,0)
> where data_ori is the original data and data_ascii is the created ascii file data.
>
> Is there a way how I can automatically add on top of the file data that is in form of text? The data I want to add is about 10 lines of text.

Write the header to the file first, then add the data.
Check out the '-append' option to DLMWRITE.

Rune