home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.soft-sys.matlab
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!udecc.engr.udayton.edu!blackbird.afit.af.mil!jbeck
- From: jbeck@afit.af.mil (Jeffrey A. Beck)
- Subject: Re: DISP1: disp1.m - display text and numbers
- Message-ID: <1993Jan25.103610.12912@afit.af.mil>
- Sender: jbeck@afit.af.mil (Jeffrey A. Beck)
- Nntp-Posting-Host: wb16.afit.af.mil
- Organization: Air Force Institute of Technology
- References: <1993Jan23.152729.26892@news.columbia.edu>
- Date: Mon, 25 Jan 1993 10:36:10 GMT
- Lines: 28
-
- 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);
- >
- >Keep these submissions coming!
- >
- >-mark broadie
-
- Mark,
- Try: disp(sprintf('x measures blah blah, it's value is %g',x))
- It works on the PC version 3.5 I'm using.
-
- Jeff
-
- ------------------------------------------------------------------------
- JEFFREY A. BECK, Capt, USAF | ___/ __ __/ __ __/
- Doctoral Student / | / / /
- Dept of Aeronautics and Astronautics __ | __/ / /
- Air Force Institute of Technology __/ __| __/ ______/ __/
- ------------------------------------------------------------------------
- INTERNET: jbeck@afit.af.mil COMPUSERVE: 71371,260
- ------------------------------------------------------------------------
-