-
Notifications
You must be signed in to change notification settings - Fork 85
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add prescale(sys::StateSpace)
and corresponding test.
#464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the isdiag
test
I noticed that somehow the |
You have forgotten to export the name of the new function, that's why it's not found in the tests. Where does the name come from? Is it a standard name? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported previously written functions
Now I have exported the function. As for the name: I saw it was already used in MATLAB and GNU Octave's Control toolbox. Also Python-control lists a function with the same name in a sort of "to-do list" of MATLAB vs. Python-control compatibility. On the other hand, I am also working on However, the |
Codecov Report
@@ Coverage Diff @@
## master #464 +/- ##
==========================================
+ Coverage 85.17% 85.20% +0.02%
==========================================
Files 31 31
Lines 3096 3102 +6
==========================================
+ Hits 2637 2643 +6
Misses 459 459
Continue to review full report at Codecov.
|
Alright great! I'm not sure why the doc tests are failing, the output looks correct to me. In either case, the failures are unrelated to this PR |
A = Diagonal(d) | ||
B = S\sys.B | ||
C = sys.C*S | ||
normalized_sys = iscontinuous(sys) ? ss(A, B, C, sys.D) : ss(A, B, C, sys.D, sys.Ts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StateSpace(A,B,C,sys.C,sys.timeevol)
would have been an approach that avoid the conditional here. We should probably also extend it to AbstractStateSpace, but there is a separate issue for that.
The function I think the issue in #462 was that
Something like this could occasionally be useful though. |
It has been a long time since I don't use MATLAB, so I did not check if it returned a diagonal matrix. The name was taken as inspiration but it could be changed. The idea behind the For the naming part, when the |
I will look deeper into what |
Bump, is the current version of |
Adds a
prescale
function as mentioned in #462