Mercurial > hg > ltpda
diff m-toolbox/m/gui/gltpda/g_pzmodelPZEdit.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/m/gui/gltpda/g_pzmodelPZEdit.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,27 @@ +function g_pzmodelPZEdit(hObject,varargin) + + global params + + currParamIndex = get(hObject,'UserData'); + poleORzero = varargin{2}; + pzes = get(hObject,'String'); + pzes = readInput(pzes,2); + [xx,yy] = size(pzes); + pzList = pz(); + for kk = 1:xx + if (yy>1 && pzes(kk,2)==0) || yy==1 , pzList(kk) = pz(pzes(kk,1)); + else pzList(kk) = pz(pzes(kk,1),pzes(kk,2)); + end + end + pzObj = params.params(currParamIndex); + pzKey = pzObj.key; + pzObj = pzObj.val; + if poleORzero, pzObj = pzmodel(pzObj.gain,pzList,pzObj.zeros); + else pzObj = pzmodel(pzObj.gain,pzObj.poles,pzList); + end + params = pset(params,pzKey,pzObj); + set(findobj('Tag','apply'),'Enable','on'); + set(findobj('Tag','undo'),'Enable','on'); + if numel(pzObj.poles)>1 || numel(pzObj.zeros)>1, buildplistFigureParam([],[],get(findobj('Tag','paramsPage'),'UserData')); end + +end