Be the first to rate this file! 66 downloads (last 30 days) File Size: 1.29 KB File ID: #21705

DispA(ll)

by Alan Robinson

 

09 Oct 2008 (Updated 16 Feb 2010)

Code covered by the BSD License  

Version of disp that can take any number of arguments

Download Now | Watch this File

File Information
Description

Wish disp took more than one argument? Tired of using fprintf to print to the console? Try Dispa('the brightness is', var, 'cd/m2').

Seems like somebody else must have written this before me, but I couldn't find it.

MATLAB release MATLAB 7.3 (R2006b)
Zip File Content  
Other Files dispa.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
21 Feb 2010 Oleg Komarov

Don't see why I should be tired of:
>> fprintf('the brightness is %.3f cd/m2 \n',32.098)
the brightness is 32.098 cd/m2

Please login to add a comment or rating.
Updates
24 May 2009

Improved comments, supports string concatenation.

21 Jun 2009

Updated description.

16 Feb 2010

now supports \t and \n style formatting, like printf (in fact, it uses fprintf to output text).

Tag Activity for this File
Tag Applied By Date/Time
strings Alan Robinson 22 Oct 2008 10:23:35
display Alan Robinson 22 Oct 2008 10:23:35
disp Alan Robinson 22 Oct 2008 10:23:35
text Alan Robinson 22 Oct 2008 10:23:35
utilities Alan Robinson 22 Oct 2008 10:23:35
string manipulation Alan Robinson 22 Oct 2008 10:23:35
disp EL N 24 Jun 2009 04:34:19
display EL N 24 Jun 2009 04:34:24
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com