No BSD License  

Highlights from
message

Be the first to rate this file! 1 Download (last 30 days) File Size: 7.25 KB File ID: #11456

message

by Todd Pataky

 

19 Jun 2006 (Updated 19 Jun 2006)

MESSAGE is a suppressible version of fprintf that functions similarly to WARNING.

| Watch this File

File Information
Description

MESSAGE Displays a message in the command window. This is an alternative to WARNING, avoiding the automatic text "Warning: ", and also allowing for more flexible formatting, using FPRINTF.

It was developed with the intention of providing suppressible feedback during code execution requiring long running durations.
(e.g. Processing file 1 of 100...
      Processing file 2 of 100... )

In this sense it can be used as a text alternative to WAITBAR.

Example Usage:

>> message('Hello')
Hello

>> message('Level 1','Hello')
Level 1
%behaves identically to FPRINTF

>> message('Level 1 %s','Hello')
Level 1 Hello

>> message('enable',{'Level 1'})
>> message('Level 1','Hello')
Hello
  

>> message('enable','Level 1')
>> message('off')
>> message('Level 1','Hello')
%no output returned
>> state = message('query','Level 1')
state =
       1

Acknowledgements
This submission has inspired the following:
message 2
MATLAB release MATLAB 6.5 (R13)
Other requirements - tested on PC and UNIX, MATLAB R13 and R14
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
fprintf Todd Pataky 22 Oct 2008 08:29:54
warning Todd Pataky 22 Oct 2008 08:29:54
text Todd Pataky 22 Oct 2008 08:29:54
message Todd Pataky 22 Oct 2008 08:29:54
waitbar Todd Pataky 22 Oct 2008 08:29:54

Contact us at files@mathworks.com