📄 show_iwc_txt.m
字号:
function show_iwC_txt(C_txt,Dir)%show_iwC_txt(iwC_txt,Dir)% C_txt is a name of a text file with all circuses % for a particular image% its name has form % <image_name>C or <image_name>CP or <image_name>CA% The file in a directory Dir/Circuses % Dir is an "output direcory", default: Dir="Outinfo/"% % this function shows all computed circuses for a particular image%% this file should be created by program tt.cpp, options % -iwCtxt -iwCPtxt -iwCAtxt% List of corresponding functionals are taken form file % <Dir>functionalsList.txt, which automatically created by tt.cpp%% Each circus "c" is plotted in polar coordinates% by a curve r=|c(fi)|. % For negative c(fi), points (r,fi) are plotted green. if (nargin<2) Dir='Outinfo/';end% Reading circusesall_c=textread([Dir 'Circuses/' C_txt]);% Reading file "functionalsList.txt":functionalsList=textread('Outinfo/functionalsList.txt');Stages=functionalsList(1);Lt=functionalsList(2);Ld=functionalsList(3);Lf=functionalsList(4);N2pi=functionalsList(5);k=5;TlistU=[];for i=1:Lt,k=k+1;TlistU(i)=functionalsList(k);endDlistU=[];for i=1:Ld,k=k+1;PlistU(i)=functionalsList(k);endFlistU=[];for i=1:Lf,k=k+1;FlistU(i)=functionalsList(k);endif (length(all_c) ~= Lt*Ld*N2pi) disp('file ') disp([' ' Dir 'functionalsList.txt']) disp(['does not correspond ']) disp([' ' Dir 'Circuses/' C_txt]) beep returnend% Making figure:figure; for row=1:Lt %%in each row - all circuses for a trace matrix for d=1:Ld; k=(row-1)*Ld + d-1; Ind=k*N2pi+(1:N2pi); c=all_c(Ind); I=find(c<0); subplot(Lt,Ld,k+1); hold on; if all(c == 0) text(0,0,'Zeros'); else polar_abs_c=abs(c).*exp(1i*(0:N2pi-1)/N2pi*2*pi); plot(polar_abs_c,'.-');axis equal if ~isempty(I),plot( abs(c(I)).*exp(1i*(I-1)/N2pi*2*pi),'g.' ); end end plot(complex(0),'ro'); if d ==1, ylabel(['T=' num2str(TlistU(row))]), end title( [' P=' num2str(PlistU(d))]); if k == 0,ylabel(['T=' num2str(TlistU(row)) ' ' C_txt]),end endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -