Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster code gen #17

Merged
merged 3 commits into from
Mar 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
hcat -> vcat
  • Loading branch information
baggepinnen committed Mar 27, 2023
commit 394025bb0cfbc0554f73633c5a4056a0bfa775f7
2 changes: 1 addition & 1 deletion src/SymbolicControlSystems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function ccode(sys::StateSpace{<:Discrete}; cse = true, function_name = "transfe
x = [Sym("x[$(i-1)]") for i = 1:nx]
# @show P
if ControlSystemsBase.numeric_type(sys) <: SymPy.Sym
vars = reduce(hcat, [collect(M.free_symbols) for M in (sys.A, sys.B, sys.C, sys.D)]) |> unique
vars = reduce(vcat, [collect(M.free_symbols) for M in (sys.A, sys.B, sys.C, sys.D)]) |> unique
vars = sort(vars, by = string)
var_str = ""
for var in vars
Expand Down