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 2424Gain. f (k; name) = Gain. f (; k, name)
2525
2626"""
27- MatrixGain(K::AbstractArray; name)
27+ MatrixGain(; K::AbstractArray, name)
2828
2929Output the product of a gain matrix with the input signal vector.
3030
31- # Parameters :
31+ # Structural parameters :
3232
3333 - `K`: Matrix gain
3434
@@ -38,19 +38,19 @@ Output the product of a gain matrix with the input signal vector.
3838 - `output`
3939"""
4040@mtkmodel MatrixGain begin
41- @parameters begin
42- K, [description = " Matrix gain " ]
41+ @structural_parameters begin
42+ K
4343 end
4444 begin
45- nout = size (getdefault (K) , 1 )
46- nin = size (getdefault (K) , 2 )
45+ nout = size (K , 1 )
46+ nin = size (K , 2 )
4747 end
4848 @components begin
4949 input = RealInput (; nin = nin)
5050 output = RealOutput (; nout = nout)
5151 end
5252 @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)
5454 for i in 1 : nout]. ..
5555 end
5656end
You can’t perform that action at this time.
0 commit comments