home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.soft-sys.matlab
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!news.columbia.edu!cunixf.cc.columbia.edu!mnb2
- From: mnb2@cunixf.cc.columbia.edu (Mark Nathan Broadie)
- Subject: Re: DISP1: disp1.m - display text and numbers
- Message-ID: <1993Jan25.142824.5268@news.columbia.edu>
- Sender: usenet@news.columbia.edu (The Network News)
- Nntp-Posting-Host: cunixf.cc.columbia.edu
- Reply-To: mnb2@cunixf.cc.columbia.edu (Mark Broadie)
- Organization: Columbia University
- References: <1993Jan23.152729.26892@news.columbia.edu> <1993Jan25.103610.12912@afit.af.mil>
- Date: Mon, 25 Jan 1993 14:28:24 GMT
- Lines: 23
-
- Thanks for the comments about disp1.m. I realize you don't need
- an m-file for this, but it's easier. disp1.m takes up to 10
- arguments, with strings or numbers in any order. fprintf and
- sprintf are limited to 3 arguments. disp1 is slightly simpler
- and shorter than using num2str directly:
- disp1('x = ', x, ' y = ', y)
- vs.
- disp(['x = ' num2str(x) ' y = ' num2str(y)])
-
- In general, I find that display information 'nicely' is not easy
- with MATLAB. For example, does anyone have a *simple* way to
- display a small table with row and column headings. By simple,
- I mean not having to count spaces. For example, an m-file
- to display
-
- Col1 head Col2 heading Col3 head
- Row1 label 0.0 1.0 -3.4
- Row2 label here 0.0 1.0 -3.4
- Row3 label 0.0 1.0 -3.4
-
-
- -mark broadie
-
-