File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 24
24
Gain. f (k; name) = Gain. f (; k, name)
25
25
26
26
"""
27
- MatrixGain(K::AbstractArray; name)
27
+ MatrixGain(; K::AbstractArray, name)
28
28
29
29
Output the product of a gain matrix with the input signal vector.
30
30
31
- # Parameters :
31
+ # Structural parameters :
32
32
33
33
- `K`: Matrix gain
34
34
@@ -38,19 +38,19 @@ Output the product of a gain matrix with the input signal vector.
38
38
- `output`
39
39
"""
40
40
@mtkmodel MatrixGain begin
41
- @parameters begin
42
- K, [description = " Matrix gain " ]
41
+ @structural_parameters begin
42
+ K
43
43
end
44
44
begin
45
- nout = size (getdefault (K) , 1 )
46
- nin = size (getdefault (K) , 2 )
45
+ nout = size (K , 1 )
46
+ nin = size (K , 2 )
47
47
end
48
48
@components begin
49
49
input = RealInput (; nin = nin)
50
50
output = RealOutput (; nout = nout)
51
51
end
52
52
@equations begin
53
- [output. u[i] ~ sum (getdefault (K) [i, j] * input. u[j] for j in 1 : nin)
53
+ [output. u[i] ~ sum (K [i, j] * input. u[j] for j in 1 : nin)
54
54
for i in 1 : nout]. ..
55
55
end
56
56
end
You can’t perform that action at this time.
0 commit comments