Skip to content

Commit 6e2af95

Browse files
fix: Bug fix to have zero instead of zero vector
1 parent 382e97c commit 6e2af95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Blocks/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Base class for a multiple input multiple output (MIMO) continuous system block.
166166
- `u_guess`: Initial value for the input
167167
- `y_start`: Initial value for the output
168168
"""
169-
@component function MIMO(; name, nin = 1, nout = 1, u_start = nothing, y_start = nothing, u_guess = zeros(nin), y_guess = zeros(nout))
169+
@component function MIMO(; name, nin = 1, nout = 1, u_start = nothing, y_start = nothing, u_guess = nin > 1 ? zeros(nin) : 0.0, y_guess = nout > 1 ? zeros(nout) : 0.0)
170170
if u_start !== nothing
171171
Base.depwarn(
172172
"The keyword argument `u_start` is deprecated. Use `u_guess` instead.", :u_start)

0 commit comments

Comments
 (0)