diff m-toolbox/classes/@pz/setQ.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/@pz/setQ.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,25 @@
+% SETQ Set the property 'q'
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DESCRIPTION: SETQ Set the property 'q' and computes 'ri'
+%
+% CALL:        obj = obj.setQ(1);
+%              obj = setQ(obj, 1);
+%
+% INPUTS:      obj - is a pz object
+%
+% VERSION:     $Id: setQ.m,v 1.3 2011/02/18 16:48:54 ingo Exp $
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function ii = setQ(ii, val)
+
+  %%% decide whether we modify the pz-object, or create a new one.
+  ii = copy(ii, nargout);
+
+  %%% set 'q'
+  ii.q = val;
+  %%% Then compute and set ri
+  ii.ri = pz.fq2ri(ii.f, ii.q);
+
+end