Skip to content

Commit e47076d

Browse files
committed
don't write interpolation arrays for constant matrices
1 parent be35927 commit e47076d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SymbolicControlSystems.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,11 @@ function print_c_array(
692692
print_c_array(io, t, ivecname; cse, s, struct_name)
693693
for p in (:A, :B, :C, :D)
694694
A = getproperty.(sys, p)
695-
print_c_array(io, A, t, name * "_" * string(p) * en; cse, s, print_vector = false, struct_name, struct_type, ivecname)
695+
if allequal(A)
696+
print_c_array(io, A[1], name * "_" * string(p) * en; cse, s, struct_name)
697+
else
698+
print_c_array(io, A, t, name * "_" * string(p) * en; cse, s, print_vector = false, struct_name, struct_type, ivecname)
699+
end
696700
end
697701
end
698702

0 commit comments

Comments
 (0)