Skip to content

inconsistent kwarg klist/kvect/gains in rlocus doc #998

Description

@gdmcbain

The first line of the docstring for rlocus suggests that there's a kwarg klist,

"""rlocus(sys[, klist, xlim, ylim, ...])

"""rlocus(sys[, klist, xlim, ylim, ...])

but in the list of parameters it's kvect.

kvect : array_like, optional

They're all just passed on to root_locus_plot anyway

retval = root_locus_plot(*args, **kwargs)

and it's expecting kvect, or, really, gains

gains = config._process_legacy_keyword(kwargs, 'kvect', 'gains', gains)

Activity

  1. gdmcbain commented on May 9, 2024

    @gdmcbain
    ContributorAuthor

    This is miscalled in pymoca/pymoca test/notebooks/Spring,ipynb:

        "control.rlocus(ss[0,0], klist=pl.logspace(-2,1,1000));\n",
  2. bnavigator commented on May 9, 2024

    @bnavigator
    Contributor

    The first line of the docstring for rlocus suggests that there's a kwarg klist,

    Only for the MATLAB wrapper though. The MATLAB docs call the parameter k by the way.
    Using a MATLAB wrapper with a python kwarg is somehow unusual.

    PR welcome.

    This is miscalled in pymoca/pymoca test/notebooks/Spring,ipynb:

    The MATLAB wrapper is not part of that call. The kwarg for control.rlocus has been kvect for 13 years: 8ebb73b.

  3. gdmcbain commented on May 10, 2024

    @gdmcbain
    ContributorAuthor

    Ah, yes, sorry I see now that control.rlocus doesn't call control.matlab.wrappers.rlocus at all but rather control.root_locus_plot; I had overlooked this:

    rlocus = root_locus_plot

    My real problem was pymoca/pymoca#324 so I'll look over there at fixing that. I'm not presently concerned with control.matlab, but I'll turn in the PR as requested, while I'm at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions