📄 vfrsp.m
字号:
function [frspall,hinfall] = vfrsp(arg1,arg2,arg3,arg4)% [frspall,hinfall] = vfrsp(vlpv,w)% calculates "frozen-point" LPV frequency responses.% [frspblk,hinfall] = vfrsp(vlpv,w,rblk,cblk)% takes vnorms of blocks specified by row & column indices.%% vfrsp(frspall,npts,plot_type) or vfrsp(hinfall,npts,plot_type)% [NOTE: zero output arguments]% plots such frequency responses interactively: row & column indices are% entered as a two-digit integer, e.g. '11' -> (1,1) %% vlpv VARYING array of npts SYSTEM matrices% w frequency vector% rblk/cblk 2-column indices to row/column blocks, i.e., at each grid pt% sel(blk_frsp_at_grid_pt,i,j) = % vnorm(sel(frsp_at_grid_pt,rblk(i,1):rblk(i,2), cblk(i,1):cblk(i,2)))% npts number of grid points% plot_type type of plot, as in VPLOT.M (default = 'liv,lm')% frspall VARYING (by w) frsps, stacked side-by-side by grid point% hinfall VARYING (by w) frsp norms, side-by-side by grid pointif nargout > 0 %%%%% calculate vlpv = arg1; w = arg2; [mtyp,no,ni,npts] = minfo(vlpv); if mtyp ~= 'vary' vlpv = vpck(vlpv,1); end [mtyp,no,ni,dum] = minfo(xtracti(vlpv,1,1)); if nargin > 2 rblk = arg3; cblk = arg4; no = size(rblk,1); ni = size(cblk,1); end hinfall = []; frspall = []; ii = 0; for jj = 1:npts% if all(viv-jj) % fill in ones here% frsphere = vpck(ones(no*length(w),ni),w);% hinfhere = vpck(ones(length(w),1),w);% else ii = ii + 1; frsphere = frsp(xtracti(vlpv,ii,1),w); hinfhere = vnorm(frsphere); if nargin > 2 frspblk = []; for kr = 1:no frspbrow = []; for kc = 1:ni frspbrow = sbs(frspbrow,... vnorm(sel(frsphere,rblk(kr,1):rblk(kr,2),cblk(kc,1):cblk(kc,2)))); end frspblk = abv(frspblk,frspbrow); end frsphere = frspblk; end% end frspall = sbs(frspall,frsphere); hinfall = sbs(hinfall,hinfhere); endelse %%%%% plot frspin = arg1; npts = arg2; if nargin >= 3 plot_type = arg3; else plot_type = 'liv,lm'; end [ftyp,no,nio,dum3] = minfo(frspin); if rem(nio,npts) error('Number of grid points inconsistent with size of data') else ni = nio/npts; end % Get grid points ptin = npts+1; while max(ptin) > npts | min(ptin) < 0 ptin = input('Grid points to plot (0 for all, ENTER if done): '); end while ~isempty(ptin) % Get row & column numbers if max([no ni]) == 1 row = 1; col = 1; else row = 0; col = 0; while (row > no) | (col > ni) | (min([row col]) < 1) | isempty([row col]) rowcol = input('Output,input to plot (Enter 2-digit integer): '); if isempty(rowcol), return; end row = floor(rowcol/10); col = rem(rowcol,10); end end % Plot the dude if ptin == 0 ptin = 1:npts; end vplot(plot_type,sel(frspin,row,(ptin-1)*ni+col)); title(['Channel (' int2str(row) ',' int2str(col) ')']) % Get grid points ptin = npts+1; while max(ptin) > npts ptin = input('Grid points to plot (0 for all, ENTER if done): '); end endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -