Thread Subject: clearing text files

Subject: clearing text files

From: Juliette Salexa

Date: 8 Jun, 2009 22:25:03

Message: 1 of 3

I'm getting matlab to write some text to a txt file but I want it first to remove anything that's already in that text file .. so that it's clear before I start writing. Can matlab do this ?/

Subject: clearing text files

From: TideMan

Date: 8 Jun, 2009 23:15:01

Message: 2 of 3

On Jun 9, 10:25 am, "Juliette Salexa" <juliette.physic...@gmail.com>
wrote:
> I'm getting matlab to write some text to a txt file but I want it first to remove anything that's already in that text file .. so that it's clear before I start writing.  Can matlab do this ?/

If you use:
fid=fopen(txtfile,'wt');
the 'wt' will do it for you automatically.

Subject: clearing text files

From: us

Date: 8 Jun, 2009 23:20:18

Message: 3 of 3

"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message <h0k33v$44a$1@fred.mathworks.com>...
> I'm getting matlab to write some text to a txt file but I want it first to remove anything that's already in that text file .. so that it's clear before I start writing. Can matlab do this ?/

a hint:

     help delete;

us

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
reference us 8 Jun, 2009 19:24:04
rssFeed for this Thread

Contact us at files@mathworks.com