ControlSystems.jl icon indicating copy to clipboard operation
ControlSystems.jl copied to clipboard

Docstring for nyquist uses im as an output argument –> clash with the imaginary unit im

Open hurak opened this issue 10 months ago • 0 comments

Docstring for nyquist https://github.com/JuliaControl/ControlSystems.jl/blob/475758a12f2d85340410e683d92060bc1f0bb060/lib/ControlSystemsBase/src/freqresp.jl#L343 usesim as an output argument, but this unnecessarily clashes with the imaginary unit im in Julia.

In this particular case it can be even more troubling as some users of nyquist may want to create the full complex frequency response by assembling the provided real and imaginary parts as in G(jw) = re(jw) + i im(jw). In fact, this is how I myself encountered the trouble: Gjw = re + im*im.

Of course users can rename their output arguments as they like, but some of them may just copy and paste. And why promoting the habit of overwriting Julia's keywords.

hurak avatar Apr 27 '24 09:04 hurak