Mercurial > hg > ltpda
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 function g_pzmodelPZEdit(hObject,varargin) | |
2 | |
3 global params | |
4 | |
5 currParamIndex = get(hObject,'UserData'); | |
6 poleORzero = varargin{2}; | |
7 pzes = get(hObject,'String'); | |
8 pzes = readInput(pzes,2); | |
9 [xx,yy] = size(pzes); | |
10 pzList = pz(); | |
11 for kk = 1:xx | |
12 if (yy>1 && pzes(kk,2)==0) || yy==1 , pzList(kk) = pz(pzes(kk,1)); | |
13 else pzList(kk) = pz(pzes(kk,1),pzes(kk,2)); | |
14 end | |
15 end | |
16 pzObj = params.params(currParamIndex); | |
17 pzKey = pzObj.key; | |
18 pzObj = pzObj.val; | |
19 if poleORzero, pzObj = pzmodel(pzObj.gain,pzList,pzObj.zeros); | |
20 else pzObj = pzmodel(pzObj.gain,pzObj.poles,pzList); | |
21 end | |
22 params = pset(params,pzKey,pzObj); | |
23 set(findobj('Tag','apply'),'Enable','on'); | |
24 set(findobj('Tag','undo'),'Enable','on'); | |
25 if numel(pzObj.poles)>1 || numel(pzObj.zeros)>1, buildplistFigureParam([],[],get(findobj('Tag','paramsPage'),'UserData')); end | |
26 | |
27 end |