From e271a81db5b1657bf680c851b9549fdc54175a10 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 16:40:25 +0000 Subject: [PATCH] Define numeric_type for FRD ControlSystemsBase v1.25 calls numeric_type on the systems in the nyquistplot recipe to decide whether to compute default axis limits, which threw a MethodError for FRD and failed the plots testset. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01JGy8YYkQk9fZRdRQ5aV7S6 --- src/frd.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frd.jl b/src/frd.jl index 6ebb3b8e..aa1fd62b 100644 --- a/src/frd.jl +++ b/src/frd.jl @@ -112,6 +112,7 @@ ControlSystemsBase.noutputs(f::FRD) = f.r isa AbstractVector ? 1 : size(f.r, 1) ControlSystemsBase.ninputs(f::FRD) = f.r isa AbstractVector ? 1 : size(f.r, 2) ControlSystemsBase._default_freq_vector(f::Vector{<:FRD}, ::Any; kwargs...) = f[1].w ControlSystemsBase._default_freq_vector(f::FRD, ::Any; kwargs...) = f.w +ControlSystemsBase.numeric_type(::Type{<:FRD{<:Any,RT}}) where RT = eltype(RT) # Used by, e.g., the nyquistplot recipe. FRD is not rational, so the recipe computes no poles or zeros function ControlSystemsBase.bode(f::FRD, w::AbstractVector = f.w; unwrap=true, kwargs...) # kwargs such as balance do not apply to frequency-response data w == f.w || error("Frequency vector must match the one stored in the FRD") angles = angle.(f.r)