Skip to content
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions lib/ControlSystemsBase/src/freqresp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function (sys::TransferFunction)(s)
end

function (sys::TransferFunction)(z_or_omega::Number, map_to_unit_circle::Bool)
isdiscrete(sys) || throw(ArgumentError("It only makes no sense to call this function with discrete systems"))
isdiscrete(sys) || throw(ArgumentError("This function can only be called with discrete-time systems"))
if map_to_unit_circle
isreal(z_or_omega) ? evalfr(sys,exp(im*z_or_omega.*sys.Ts)) : error("To map to the unit circle, omega should be real")
else
Expand All @@ -304,7 +304,7 @@ function (sys::TransferFunction)(z_or_omega::Number, map_to_unit_circle::Bool)
end

function (sys::TransferFunction)(z_or_omegas::AbstractVector, map_to_unit_circle::Bool)
isdiscrete(sys) || throw(ArgumentError("It only makes no sense to call this function with discrete systems"))
isdiscrete(sys) || throw(ArgumentError("This function can only be called with discrete-time systems"))
vals = sys.(z_or_omegas, map_to_unit_circle)# evalfr.(sys,exp.(evalpoints))
# Reshape from vector of evalfr matrizes, to (in,out,freq) Array
nu,ny = size(vals[1])
Expand Down
Loading