Home > classes > @specwin > set.m

set

PURPOSE ^

SET a specwin property.

SYNOPSIS ^

function w = set(w, varargin)

DESCRIPTION ^

 SET a specwin property.
   
   w = set(w, 'name', 'blah');
 
 M Hewitson 30-01-07
 
 $Id: set.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function w = set(w, varargin)
0002 
0003 % SET a specwin property.
0004 %
0005 %   w = set(w, 'name', 'blah');
0006 %
0007 % M Hewitson 30-01-07
0008 %
0009 % $Id: set.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $
0010 %
0011 
0012 propArgin = varargin;
0013 while length(propArgin) >= 2
0014   prop = propArgin{1};
0015   val  = propArgin{2};
0016   propArgin = propArgin(3:end);
0017   switch prop
0018     case 'name'
0019       w.name = val;
0020     otherwise
0021       error([val, ' is not a property of specwin class']);
0022   end
0023 end
0024 
0025 testAO(ao);

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003