-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSetQTTransBVec.m
More file actions
35 lines (28 loc) · 843 Bytes
/
Copy pathSetQTTransBVec.m
File metadata and controls
35 lines (28 loc) · 843 Bytes
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
function [IntBC] = SetQTTransBVec(IntBC,t)
QTGlobals
for i=1:length(IntBC)
if IntBC(i).trans
for j=1:length(IntBC(i).blocks)
b = IntBC(i).blocks(j);
SetQTBTransVecBlock(Blocks{b},IntBC(i),t);
end
end
end
end
function SetQTBTransVecBlock(block,IntBC,t)
QTGlobals
n = block.k;
if IntBC.mode == 'v'
QTBVec(n) = QTTransFct(IntBCVal.TransMode(1),IntBC.valTrans{1},t);
return
elseif IntBC.mode == 'g'
v = QTTransFct(IntBCVal.TransMode(1),IntBC.valTrans{1},t);
g = QTTransFct(IntBCVal.TransMode(2),IntBC.valTrans{2},t);
QTBVec(n) = -v*g;
elseif IntBC.mode == 'm'
v = QTTransFct(IntBC.TransMode(1),IntBC.valTrans{1},t);
g = QTTransFct(IntBC.TransMode(2),IntBC.valTrans{2},t);
f = QTTransFct(IntBC.TransMode(3),IntBC.valTrans{3},t);
QTBVec(n) = -v*g + f;
end
end