home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.soft-sys.matlab
- Path: sparky!uunet!gumby!destroyer!ncar!netnews.whoi.edu!news
- From: rich@boreas.whoi.edu
- Subject: Re: DISP1: disp1.m - display text and numbers
- Message-ID: <1993Jan23.233224.11781@netnews.whoi.edu>
- Sender: news@netnews.whoi.edu
- Organization: Woods Hole Oceanographic Institution
- References: <1993Jan23.152729.26892@news.columbia.edu>
- Date: Sat, 23 Jan 93 23:32:24 GMT
- Lines: 22
-
- In article <1993Jan23.152729.26892@news.columbia.edu> mnb2@cunixf.cc.columbia.edu (Mark Broadie) writes:
- >Trying to continue the trend, here is an m-file for display
- >text and numbers to the screen on a single line. I had m-files
- >filled with statements like
- > disp('x measures blah blah, its value is'); disp(x);
- >which (a) uses 2 display statements and (b) does not appear
- >on a single line on the screen. The m-file disp1.m allows the
- >statement
- > disp1('x measures blah blah, its value is ', x);
- >
- > [script deleted]
-
- You don't need an m-file for that - just use:
-
- disp(['x measures blah blah, its value is ' num2str(x)]);
-
-
- --
- Rich Pawlowicz ----------------- INTERNET: rich@boreas.whoi.edu
- Woods Hole Oceanographic Institution
- "Home of the 99 cent squid burger (cheese extra)"
- --------------------------------------------------------------
-