ilayn / harold

An open-source systems and controls toolbox for Python3
MIT License
173 stars 19 forks source link

DOC: Add example for haroldpolydiv #38

Closed whzup closed 6 years ago

whzup commented 6 years ago

Added an example for the haroldpolydivfunction. With and without a remainder.

ilayn commented 6 years ago

Nice! Yesterday I've enabled the intersphinx extension so now you can (hopefully) write

 :func:`scipy.signal.deconvolve`

to link to the SciPy documentation automatically which I apparently forgot 😃

ilayn commented 6 years ago

Example here https://harold.readthedocs.io/en/latest/generated/harold.lqr.html#harold.lqr for the rendering in the notes section

whzup commented 6 years ago

Ok, I'll bring this in too :+1: My lectures start again next week so I'll probably be able to use this library in my "Signals and Systems" class :smile: Maybe I can contribute some more examples after that :yum:

And I have a question regarding haroldpolydiv and haroldpolymult. polydiv uses the scipy method to deconvolve and polymult uses the numpy method is there a reason for that? Or is there even a difference? It's just a bit weird because there is also a scipy method for convolving.

ilayn commented 6 years ago

Ok, I'll bring this in too 👍 My lectures start again next week so I'll probably be able to use this library in my "Signals and Systems" class 😄 Maybe I can contribute some more examples after that 😋

That would be great to have first hand feedback. Good luck with your studies!

And I have a question regarding haroldpolydiv and haroldpolymult. polydiv uses the scipy method to deconvolve and polymult uses the numpy method is there a reason for that? Or is there even a difference? It's just a bit weird because there is also a scipy method for convolving.

Not really a big difference but SciPy convolve has a bit of an extra overhead since that is a more general function. And since this is used a lot in the MIMO transfer functions, I've taken NumPy's version. Also historically I started to use NumPy poly1d objects which was not accepted by SciPy version but then I've stopped and resorted back to plain arrays.