JuliaControl / ControlSystems.jl

A Control Systems Toolbox for Julia
https://juliacontrol.github.io/ControlSystems.jl/stable/
Other
503 stars 85 forks source link

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

Open hurak opened 3 months ago

hurak commented 3 months ago

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.