Be the first to rate this file! 10 Downloads (last 30 days) File Size: 1.31 KB File ID: #21705

DispA(ll)

by

 

09 Oct 2008 (Updated )

Enhanced disp that can take any number of arguments

| 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');

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
04 Aug 2010 Alan Robinson

I guess it depends on how much you like printf strings. I find them easy to write, but error prone to edit after the fact.

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

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).

17 Dec 2012

V3.1: This revision has better help text.

Contact us