From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: fprintf() statements
Date: Mon, 29 Oct 2012 20:02:34 -0500
Organization: NNTP Server
Lines: 21
Message-ID: <k6n8vc$13q$>
References: <k6n89r$sia$>
Reply-To: <HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
X-Notice: Filtered by postfilter v. 0.8.2
Xref: comp.soft-sys.matlab:781628

On 10/29/2012 7:51 PM, Jonathan Ruffley wrote:

> the part of this code that was unfamiliar to me was the '1' in
>the fprintf() statement. I am aware that that position is used
>for a file identifier; is there any other reason to put a '1' in that
>position? I also experimented a bit and found that if I replace the '1' with a '2',
>the string still displays to the command window, but is the color red. Thanks for the assistance!

'1' is default. So use it or not, it is the same.
'2' for standard error. I guess that is why it prints in 'red' since
it is supposed to be an error message.

Here are the 3 standard file id: 0,1,2

Matlab uses the same standard.