forked from wozy13/DIAMOND
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inpokhand.m
49 lines (42 loc) · 1.95 KB
/
inpokhand.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
function inpokhand
global sys HANDLES
if sys.input.n==1
sys.input.ran.T=str2num(get(HANDLES.siminpdef.edt(1),'string'));
sys.input.ran.nt=str2num(get(HANDLES.siminpdef.edt(2),'string'));
sys.input.ran.frsd=str2num(get(HANDLES.siminpdef.edt(3),'string'));
[sys.input.x,sys.input.t]=...
ransiggen(1,sys.input.ran.nt,sys.input.ran.T,sys.input.ran.frsd);
end
if sys.input.n==2
sys.input.har.T=str2num(get(HANDLES.siminpdef.edt(1),'string'));
sys.input.har.nt=str2num(get(HANDLES.siminpdef.edt(2),'string'));
sys.input.har.nc=str2num(get(HANDLES.siminpdef.edt(3),'string'));
sys.input.har.fr=str2num(get(HANDLES.siminpdef.edt(4),'string'));
sys.input.har.amp=str2num(get(HANDLES.siminpdef.edt(5),'string'));
sys.input.har.strt=str2num(get(HANDLES.siminpdef.edt(6),'string'));
sys.input.har.stop=str2num(get(HANDLES.siminpdef.edt(7),'string'));
[sys.input.x,sys.input.t]=...
harm(sys.input.har.nc, sys.input.har.nt, sys.input.har.T,...
sys.input.har.fr, [sys.input.har.strt' sys.input.har.stop'],...
sys.input.har.amp);
end
if sys.input.n==3
sys.input.imp.T=str2num(get(HANDLES.siminpdef.edt(1),'string'));
sys.input.imp.nt=str2num(get(HANDLES.siminpdef.edt(2),'string'));
sys.input.imp.t=str2num(get(HANDLES.siminpdef.edt(3),'string'));
sys.input.imp.td=str2num(get(HANDLES.siminpdef.edt(4),'string'));
sys.input.har.f=str2num(get(HANDLES.siminpdef.edt(5),'string'));
[sys.input.x,sys.input.t]=...
impsig(sys.input.imp.T, sys.input.imp.t, sys.input.imp.T,...
sys.input.imp.td, sys.input.imp.nt);
end
if sys.input.n==4;
sys.input.t=evalin('base',get(HANDLES.siminpdef.edt(1),'string'));
sys.input.x=evalin('base',get(HANDLES.siminpdef.edt(2),'string'));
sys.input.T=max(sys.input.t);
else
sys.input.T=str2num(get(HANDLES.siminpdef.edt(1),'string'));
end
hideallbtns
set(HANDLES.hmmenu{20}(3),'enable','on')
set(HANDLES.hmmenu{20}(4),'enable','on')