-
Notifications
You must be signed in to change notification settings - Fork 3
/
brnchdef.m
47 lines (33 loc) · 1.17 KB
/
brnchdef.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
% This script updates GUI data after any one of the
% following actions:
% Response to Branch edit text
CurrentBranch=max([1,round(get(sli_branch,'Value'))]);
NewData=get(BranchTapBus,'String');
NewData=str2num(NewData);
tap_bus(CurrentBranch)=NewData;
NewData=get(BranchZBus,'String');
NewData=str2num(NewData);
z_bus(CurrentBranch)=NewData;
NewData=get(BranchType,'String');
NewData=str2num(NewData);
trans_type(CurrentBranch)=NewData;
NewData=get(BranchResistance,'String');
NewData=str2num(NewData);
brch_r(CurrentBranch)=NewData;
NewData=get(BranchReactance,'String');
NewData=str2num(NewData);
brch_x(CurrentBranch)=NewData;
NewData=get(ControlledBus,'String');
NewData=str2num(NewData);
cnrl_bus_nmbr(CurrentBranch)=NewData;
NewData=get(MinimumTap,'String');
NewData=str2num(NewData);
min_tp_shft(CurrentBranch)=NewData;
NewData=get(MaximumTap,'String');
NewData=str2num(NewData);
max_tp_shft(CurrentBranch)=NewData;
NewData=get(TapStep,'String');
NewData=str2num(NewData);
step_size(CurrentBranch)=NewData;
branch_data=[tap_bus;z_bus;trans_type;brch_r;brch_x;cnrl_bus_nmbr;min_tp_shft;max_tp_shft;step_size];
brnchdat;