📄 param_plot.m
字号:
function param_plot(btype, N, sty, sty_re, sty_im, Aml, a0l, fa1, fa2, fa3, fa4, fa5, Bml, b0l, fb1, fb2, fb3, fb4, fb5)% function param_plot(btype, N, sty, sty_re, sty_im, Aml, a0l, fa1, fa2, fa3, fa4, fa5, Bml, b0l, fb1, fb2, fb3, fb4, fb5)% This file is part of the TFPM toolbox v1.0 (c)% michael.jachan@tuwien.ac.at and underlies the GPL.% % Plots the TVAR parameters Amn and the TVMA parameters Bmn in 5% different manners:% f1: the magnitude Cml, % f2: the time functions Cmn, % f3: the TD frequency-roots TDFRCmn, % f4: the FD time-roots FDTRClk, % f5: the Kamen roots CKmn. NOT YET!%% The switch sty determines how the functions are plotted:% sty==0: All real parts of the functions C_m[n] are plotted% into the same axis.% sty==1: For each (complex) parameter function a seperate axis% is generated.% The switch c0l determines if the parameters c_{0l} are plotted. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clear;tfpm;N = 128;MAR = 7;LAR = 5;MMA = 0;LMA = LAR;re_im= 'r';mo_no= 'n';tfpm_file_gen;%-------------%Aml= ALTI;%Bml= BLTI;btype= 'exp';a0l= 1;b0l= 1;sty= 0;sty_re= '.';sty_im= ':';fa1= 1;fa2= 2;fa3= 3;fa4= 4;fa5= 5;fb1= 6;fb2= 7;fb3= 8;fb4= 9;fb5= 10;fb1= 0;fb2= 0;fb3= 0;fb4= 0;fb5= 0;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Dimensions[MAR, LAR]= param_dim(Aml);[MMA, LMA]= param_dim(Bml);% PrecomputationsAmn = param_expand(Aml, N, btype);[TDFRAmn, TDFRA0n]= param_tdir(Amn);Bmn = param_expand(Bml, N, btype);[TDFRBmn, TDFRB0n]= param_tdir(Bmn);% Plot Magnitude of Aml/Bmlif(fa1 & (MAR>0) & (LAR>0)) figure(fa1);clf tfpm_plot_cml(Aml, a0l);end;if(fb1 & (MMA>0) & (LMA>0)) figure(fb1);clf tfpm_plot_cml(Bml, b0l);end;% Plot parameter functions Am[n]/Bm[n]if(fa2) figure(fa2);clf tfpm_plot_cmn(Amn, a0l, sty, sty_re, sty_im)end;if(fb2) figure(fb2);clf tfpm_plot_cmn(Bmn, b0l, sty, sty_re, sty_im)end;% Plot TDFRif(fa3 & ~isempty(TDFRAmn)) figure(fa3);clf% tfpm_plot_roots(TDFRAmn, max(max(max(real(TDFRAmn))), 1), max(max(max(imag(TDFRAmn))), 1), 'x'); plot(abs(TDFRAmn)) grid;box;end;if(fb3 & ~isempty(TDFRBmn)) if(fa3~=fb3) figure(fb3);clf; end; tfpm_plot_roots(TDFRBmn, max(max(max(real(TDFRBmn))), 1), max(max(max(imag(TDFRBmn))), 1), 'o'); if(fa3~=fb3) grid;box; end;end;% Plot FDTRif(fa4) [FDTRAlk, FDTRALk]= param_fdir(Amn); figure(fa4);clf tfpm_plot_roots(FDTRAlk, max(max(max(real(FDTRAlk))), 1), max(max(max(imag(FDTRAlk))), 1), 'x'); grid;box;end;if(fb4) [FDTRBlk, FDTRBLk]= param_fdir(Bmn); if(fa4~=fb4) figure(fb4);clf; end; tfpm_plot_roots(FDTRBlk, max(max(max(real(FDTRBlk))), 1), max(max(max(imag(FDTRBlk))), 1), 'o'); if(fa4~=fb4) grid;box; end;end;% Plot Kamen poles/zeros%if(fa5 & ~isempty(AKmn))% figure(fa5);clf% tfpm_plot_roots(AKmn, max(max(max(real(AKmn))), 1), max(max(max(imag(AKmn))), 1), 'x');% grid;box;%end;%if(fb5 & ~isempty(BKmn))% if(fa5~=fb5)% figure(fb5);clf;% end;% tfpm_plot_roots(BKmn, max(max(max(real(BKmn))), 1), max(max(max(imag(BKmn))), 1), 'o');% if(fa5~=fb5)% grid;box;% end;%end;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clear;tfpm;N = 128;Aml= [ 0.00 0.35+0.10j -0.20+0.15j; 1.00 -0.55 +0.30 ; 0.00 0.35-0.10j -0.20-0.15j; ]Aml= [ 0.00 0.40-0.45j -0.20+0.20j; 1.00 -0.55 +0.30 ; 0.00 0.40+0.45j -0.20-0.20j; ]Aml= [ 0.00 0.25+0.10j -0.20+0.05j 0.15-0.10j; 1.00 -0.45 +0.30 -0.25 ; 0.00 0.25-0.10j -0.20-0.05j 0.15+0.10j; ]Aml= [ 0.00 0.30-0.20j -0.20+0.25j 0.15-0.10j; 1.00 -0.75 +0.65 -0.30 ; 0.00 0.30+0.20j -0.20-0.25j 0.15+0.10j; ]Aml= [ 0.00 +0.15-0.10j -0.10-0.05j; 0.00 +0.15+0.10j +0.15+0.10j; 1.00 -0.25 0.35 ; 0.00 +0.15-0.10j +0.15-0.10j; 0.00 +0.15+0.10j -0.10+0.05j; ]Aml= [ 0.00 +0.20-0.15j -0.10-0.05j; 0.00 +0.25-0.25j +0.20+0.10j; 1.00 -0.40 0.45 ; 0.00 +0.25+0.25j +0.20-0.10j; 0.00 +0.20+0.15j -0.10+0.05j; ]Aml= [ 0.00 +0.00-0.05j +0.15-0.05j -0.10+0.10j; 0.00 +0.35+0.05j -0.20+0.20j +0.15-0.10j; 1.00 -0.55 0.30 0.15 ; 0.00 +0.35-0.05j -0.20-0.20j +0.15+0.10j; 0.00 +0.00+0.05j +0.15+0.05j -0.10-0.10j; ]Aml= [ 0.00 +0.00-0.05j +0.15-0.05j -0.10+0.10j; 0.00 +0.35+0.05j -0.20+0.20j +0.15-0.10j; 1.00 -0.75 0.45 0.10 ; 0.00 +0.35-0.05j -0.20-0.20j +0.15+0.10j; 0.00 +0.00+0.05j +0.15+0.05j -0.10-0.10j; ]param_plot('exp', N, 0, 'r', 'g', Aml, 1, 1, 2, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0)figure(5);mesh(fliplr(real(tfarma_impr(Aml, 1, N, 1/2))))%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -