Home > WaCoLab > package > borrowed > jprintf.m

jprintf

PURPOSE ^

JPRINTF -- general print utility.

SYNOPSIS ^

function hrtn = jprintf(varargin)

DESCRIPTION ^

 JPRINTF --  general print utility.
 function h = JPRINTF(dev,fmt,p1,p2,...) is a general replacement
 for the built-in fprintf function.  In addition to printing to a
 file or the command window, JPRINTF can print formatted output to
 one or more text windows.  The text windows resemble the command
 window and can be independantly positioned, editted, and printed.

 Parameter dev is a device specifier which controls the destination
 of the output:
    dev = 1      -- standard output
    dev = 2      -- standard error
    dev = fid    -- open file with handle = fid
    dev = -n     -- text window n (note the minus sign!)

 The optional return argument h contains a handle to the Java TextArea
 object.  Use get(h), set(h), inspect(h), or methods(h) to access its
 properties and methods.  To retrive the complete text string, use
 h.getText or get(h,'Text').  Furthermore, getappdata(0) will return a
 structure with fields containing the java TextArea objects for all open 
 windows.

 Example:
   >> jprintf(-1,'pi is approximately = %6.4f\n',pi)
   >> jprintf(-7,'HELLO WORLD\n')
   >> jprintf(-1,'Added Text')
 creates two text windows.  The first window, named "Java Box 1", contains
 the string "pi is approximately = 3.1416" on the first line and "Added Text"
 on the second line. The second window, named "Java Box 7", contains the
 string "HELLO WORLD".

 Use the pull-down menus to perform these functions:
     File: open, save, save as, page setup, print, close
     Edit: cut, copy, paste, select all, clear all
     Format: font, foreground color, background color, wrap (on/off)

 JPRINTF is programmed entirely in Matlab and Java.  It uses the Java
 classes supplied with Matlab R14, including Wildcrest J2PrinterWorks for
 implementation of all hardcopy printer functions.  Usage of Wildcrest is
 unlicensed and for evaluation purposes only.  All printouts will have a
 mandatory header/footer marked "EVALUATION USE ONLY" and an extra nag
 page at the end of the printjob.  The author cannot delete these!

 See MYDISPLAY.M for an S-function wrapper for use in Simulink.
 JPRINTF supercedes GPRINTF which will no longer be maintained.
 Help FPRINTF for more information.

 Version 1.0
 July 2004
 Mark W. Brown
 mwbrown@ieee.org

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 12-Oct-2007 20:23:47 by m2html © 2003