home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / softsys / matlab / 146 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.8 KB  |  41 lines

  1. Newsgroups: comp.soft-sys.matlab
  2. 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
  3. From: jbeck@afit.af.mil (Jeffrey A. Beck)
  4. Subject: Re: DISP1:  disp1.m - display text and numbers 
  5. Message-ID: <1993Jan25.103610.12912@afit.af.mil>
  6. Sender: jbeck@afit.af.mil (Jeffrey A. Beck)
  7. Nntp-Posting-Host: wb16.afit.af.mil
  8. Organization: Air Force Institute of Technology
  9. References: <1993Jan23.152729.26892@news.columbia.edu>
  10. Date: Mon, 25 Jan 1993 10:36:10 GMT
  11. Lines: 28
  12.  
  13. In article <1993Jan23.152729.26892@news.columbia.edu> mnb2@cunixf.cc.columbia.edu (Mark Broadie) writes:
  14. >Trying to continue the trend, here is an m-file for display
  15. >text and numbers to the screen on a single line.  I had m-files
  16. >filled with statements like
  17. >   disp('x measures blah blah, its value is');  disp(x);
  18. >which (a) uses 2 display statements and (b) does not appear
  19. >on a single line on the screen.  The m-file disp1.m allows the
  20. >statement
  21. >   disp1('x measures blah blah, its value is ', x);
  22. >
  23. >Keep these submissions coming!
  24. >
  25. >-mark broadie
  26.  
  27. Mark,
  28.   Try: disp(sprintf('x measures blah blah, it's value is %g',x))
  29. It works on the PC version 3.5 I'm using.
  30.  
  31. Jeff
  32.  
  33. ------------------------------------------------------------------------
  34. JEFFREY A. BECK, Capt, USAF                |       ___/ __  __/  __  __/
  35. Doctoral Student                        /  |      /        /        /
  36. Dept of Aeronautics and Astronautics   __  |     __/      /        /
  37. Air Force Institute of Technology   __/  __|  __/    ______/    __/
  38. ------------------------------------------------------------------------
  39. INTERNET: jbeck@afit.af.mil                        COMPUSERVE: 71371,260
  40. ------------------------------------------------------------------------
  41.