From: "Ryan " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Creating user entry form GUI
Date: Wed, 30 Jun 2010 15:03:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <i0fmb9$2h9$>
References: <i0dk91$dci$> <i0e8it$oed$>
Reply-To: "Ryan " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1277910185 2601 (30 Jun 2010 15:03:05 GMT)
NNTP-Posting-Date: Wed, 30 Jun 2010 15:03:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1521337
Xref: comp.soft-sys.matlab:649353

"Sadik " <> wrote in message <i0e8it$oed$>...
> Hi Ryan,
> As soon as you say
> fid = fopen('yourFile.txt','w');
> the contents of your file will be deleted. Now you can go ahead and write anything you want using fprintf.
> Best.

Thanks. Is there a way that I can just create a few variables in the txt file that will be updated based on the user input? I do not want to delete the entire text file, i just want to replace 3 individual variables that are repeated several times throughout the text file. I know on linux there is a function called "read" which replaces variables in this manner. Are you aware of a similar matlab function?