-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobr_filtracie.m
75 lines (64 loc) · 2.86 KB
/
obr_filtracie.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
% OBR_FILTRACIE
%
% Sluzi na samotne filtrovanie vektora dat "ynew" a filtorvane udaje zapise do "yn"
% Vykresli aj porovnanie nacitanej PCH a filtrovanej PCH
% Pomocna premenna "ic2" nadobudne hodnotu 1, aby sa vedelo, ze uz bola
% vykonana filtracia a v FILTRACIA tak pribudne ponuka IDENTIFIKACIA
%
% Vyuziva - PTF_FILT
% Spusta - FILTRACIA
% Vypocet parametrov filtracie a filtracia
[yn,b,a] = ptf_filt(ynew,typfil(1),typfil(2),typfil(3),rad_filtracie,zvlnenie,omega);
% Pomocna, aby vedel, ze uz vykonal filtraciu
ic2=1;
temp = findobj('tag','ptt_plot');
if(isempty(temp) == 1)
temp = figure('position',[10 60 700 420],'Color','white','Tag','ptt_plot');
pos_gca = get(gca,'position');
set(gca,'position',[pos_gca(1)/1.2, pos_gca(2:4)]);
temp_omega = omega;
end
s1 = uicontrol('Tag','ptt_s1',...
'Units','Normalized',...
'Position',[0.92 0.5 0.03 0.3],...
'Style','Slider',...
'Min',1,'Max',10,...
'Value',rad_filtracie,...
'Sliderstep',[0.1, 0.1],...
'CallBack','rad_filtracie = round(get(gco,''Value''));obr_filtracie');
t1 = uicontrol('Style','text',...
'Tag','ptt_t1',...
'Units','Normalized',...
'Position',[0.92 0.8 0.03 0.05],...
'String',ptg_string(8,1,ptv_str_lang),...
'BackgroundColor',get(gcf,'Color'));
s2 = uicontrol('Tag','ptt_s2',...
'Units','Normalized',...
'Position',[0.92 0.1 0.03 0.3],...
'Style','Slider',...
'Min',temp_omega*0.95,'Max',temp_omega*1.05,...
'Value',omega,...
'Sliderstep',[temp_omega*0.5, temp_omega],...
'CallBack','omega = get(gco,''Value'');obr_filtracie');
t2 = uicontrol('Style','text',...
'Tag','ptt_t1',...
'Units','Normalized',...
'Position',[0.92 0.4 0.07 0.05],...
'String',ptg_string(8,49,ptv_str_lang),...
'BackgroundColor',get(gcf,'Color'));
Qch5=uicontrol(gcf,'Tag','ptt_ch5',...
'Style','Check','Units','Pixels','Position',[20 7 70 20],...
'ForegroundColor','Black',...
'BackgroundColor',get(gcf,'Color'),...
'String',ptg_string(5,1,ptv_str_lang),...
'Value',Qcheck_yL,...
'Callback','ptg_plot_check(ptf_checkval(''ptt_ch5''),ptf_checkval(''ptt_ch6''),{[tn,ynew],[tn,yn],{''red'',''blue''}},[18,3,4],[17 18],ptv_str_lang)');
Qch6=uicontrol(gcf,'Tag','ptt_ch6',...
'Style','Check','Units','Pixels','Position',[100 7 70 20],...
'ForegroundColor','Black',...
'BackgroundColor',get(gcf,'Color'),...
'String',ptg_string(5,2,ptv_str_lang),...
'Value',Qcheck_yG,...
'Callback','ptg_plot_check(ptf_checkval(''ptt_ch5''),ptf_checkval(''ptt_ch6''),{[tn,ynew],[tn,yn],{''red'',''blue''}},[18,3,4],[17 18],ptv_str_lang)');
ptg_plot_check(ptf_checkval('ptt_ch5'),ptf_checkval('ptt_ch6'),{[tn,ynew],[tn,yn],{'red','blue'}},[18,3,4],[17 18],ptv_str_lang)
filtracia