Home > classes > @specwin > set.m

set

PURPOSE ^

SET sets a specwin property.

SYNOPSIS ^

function w = set(w, varargin)

DESCRIPTION ^

 SET sets a specwin property.

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

 DESCRIPTION: SET sets a specwin property.

 CALL:        w = set(w, 'name', 'blah');

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

 HISTORY:     30-01-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function w = set(w, varargin)
0002 % SET sets a specwin property.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: SET sets a specwin property.
0007 %
0008 % CALL:        w = set(w, 'name', 'blah');
0009 %
0010 % VERSION:     $Id: set.m,v 1.2 2007/07/18 13:58:45 ingo Exp $
0011 %
0012 % HISTORY:     30-01-2007 M Hewitson
0013 %                 Creation
0014 %
0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 
0017 propArgin = varargin;
0018 while length(propArgin) >= 2
0019   prop = propArgin{1};
0020   val  = propArgin{2};
0021   propArgin = propArgin(3:end);
0022   switch prop
0023     case 'name'
0024       w.name = val;
0025     otherwise
0026       error([val, ' is not a property of specwin class']);
0027   end
0028 end
0029 
0030 testAO(ao);

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