Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update evalfr() to be consistent with MATLAB usage#179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
murrayrm merged 5 commits intopython-control:masterfrommurrayrm:update_evalfr
Jan 13, 2018

Conversation

murrayrm
Copy link
Member

This PR addresses issue#22, in which it was pointed out that theevalfr() method in the TransferFunction and StateSpace objects takes different arguments than theevalfr() function. Specifically, theevalfr method takes a real argument (the frequency at which you want to evaluate the frequency response) and theevalfr function takes a complex argument (consistent with MATLAB usage).

This PR makes the following changes to the code base:

  • Renamedevalfr() in theFRD,StateSpace andTransferFunction classes to_evalfr() and put a deprecation warning for use of theevalfr() method.

  • Changed calls toevalfr() infrdata.py andmargins.py to use_evalfr()

  • Added unit tests for the the new methods + warnings

These changes eliminate the inconsistency in the argument form between the (MATLAB compatible)evalfr() function and theevalfr() methods for LTI objects. The_evalfr() method retains the original functionality, since it is used for computing stability margins and for converting objects to FRD form.

Renamed evalfr() in the FRD, StateSpace and TransferFunction classes to_evalfr() and put a deprecation warning for use of the evalfr() method.Changed calls to evalfr() in frdata.py and margins.py to use _evalfr()Added unit tests for the the new methods + warningsThese changes eliminate the inconsistency in the argument form between the(MATLAB compatible) evalfr() function, which takes a complex argument, andthe evalfr() methods for LTI objects, which took a real number as argument(representing the frequency).  The _evalfr() method retains the originalfunctionality, since it is used for computing stability margins and forconverting objects to FRD form.
@coveralls
Copy link

coveralls commentedJan 6, 2018
edited
Loading

Coverage Status

Coverage decreased (-0.01%) to 77.615% when pulling2915baf on murrayrm:update_evalfr into92ccf2d on python-control:master.

@murrayrmmurrayrm merged commitbb65f31 intopython-control:masterJan 13, 2018
@murrayrmmurrayrm deleted the update_evalfr branchJanuary 13, 2018 06:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@murrayrm@coveralls

[8]ページ先頭

©2009-2025 Movatter.jp