Home > classes > @zero > char.m

char

PURPOSE ^

CHAR convert a zero object into a string.

SYNOPSIS ^

function pstr = char(p)

DESCRIPTION ^

 CHAR convert a zero object into a string.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: CHAR convert a zero object into a string.

 CALL:        string = char(zero);

 VERSION:     $Id: char.m,v 1.2 2007/07/18 13:58:45 ingo Exp $

 HISTORY:     02-04-2007 Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pstr = char(p)
0002 % CHAR convert a zero object into a string.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: CHAR convert a zero object into a string.
0007 %
0008 % CALL:        string = char(zero);
0009 %
0010 % VERSION:     $Id: char.m,v 1.2 2007/07/18 13:58:45 ingo Exp $
0011 %
0012 % HISTORY:     02-04-2007 Hewitson
0013 %                 Creation
0014 %
0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 
0017 pstr = ['zero(' num2str(p.f)];
0018 if p.q > 0.5
0019   pstr = [pstr ',' num2str(p.q)];
0020 end
0021 pstr = [pstr ')'];
0022 
0023 pstr = strrep(pstr, '_', '\_');
0024 
0025 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003