-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathporovnat2.m
69 lines (54 loc) · 2.21 KB
/
porovnat2.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
% POROVNAT2
% Vykreslenie simulacie Strejcovou metodou pre identifikovany a povodny prenos
%
sim('compTF')
t_id=id_data3(:,1);
y_1=id_data3(:,2);
y_2=id_data3(:,3);
% Spracovanie odchylky
%
pth_fig = findobj('Tag','ptt_id_param');
if(isempty(pth_fig)~=1);
pth_fig = pth_fig(1);
% Vypocet chyby identifikacie: Integral(Y(povodna)-Y(identifikovana))^2 dt / Integral(Y(povodna)^2) dt
%
odchylka = ptf_square_error(y_1,y_2);
odchylka_text = uicontrol(pth_fig,...
'Style','text',...
'ForegroundColor','black',...
'Fontweight','bold',...
'Fontsize',[12],...
'BackgroundColor',fgcolor,...
'Position',[20 155 250 25],...
'String',ptg_string(2,10,ptv_str_lang));
odchylka_text = uicontrol(pth_fig,...
'Style','edit',...
'ForegroundColor','black',...
'Fontweight','bold',...
'Fontsize',[12],...
'BackgroundColor',ptf_semaph(abs(odchylka),1, 0.001, 0.005,ptv_cfbcg),...
'Position',[20 130 250 25],...
'String',num2str(odchylka) ,...
'CallBack','set(gco,''String'',num2str(odchylka))');
end
%
% Koniec - Spracovanie odchylky
% Graficky priebeh
%
figure('position',[580 60 560 420],'Color','white');
Qch1=uicontrol(gcf,'Tag','ptt_ch1',...
'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_uL,...
'Callback','ptg_plot_check(ptf_checkval(''ptt_ch1''),ptf_checkval(''ptt_ch2''),{[t_id,y_1],[t_id,y_2],{''blue'',''red''}},[19,3,4],[17,20],ptv_str_lang)');
Qch2=uicontrol(gcf,'Tag','ptt_ch2',...
'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_uG,...
'Callback','ptg_plot_check(ptf_checkval(''ptt_ch1''),ptf_checkval(''ptt_ch2''),{[t_id,y_1],[t_id,y_2],{''blue'',''red''}},[19,3,4],[17,20],ptv_str_lang)');
ptg_plot_check(ptf_checkval('ptt_ch1'),ptf_checkval('ptt_ch2'),{[t_id,y_1],[t_id,y_2],{'blue','red'}},[19,3,4],[17,20],ptv_str_lang);
param_vl2