Polynomial Diophantine solver

Version 1.1.0 (2.56 KB) by Tom Moir
Solves ah + bg =d for (g,h) polynomials.
118 Downloads
Updated 21 Dec 2019

View License

Finds the minimum degree solution to the polynomial Diophantine equation

ah+bg=d

Useful in optimal LQG control, optimal filters etc

See code for example testd
function is Diophantine

Be sure to include a one-step delay minimum in the b polynomial. The ratio b/a is like a plant transfer function for a control-system. The delay is implicit within the b polynomial. For example, you can have bp=[0 1 2 3] but not [1 2 3] since there must be a minimum of a one-step time-delay in any digital system. hence bp(1) is always zero but to add more delay eg a two-step delay you can put bp=[0 0 1 2 3]. The d polynomial is usually found from a spectral factorization but here I just put in an arbitrary polynomial for illustration purposes. The program checks the given g and h polynomials satisfies the equation by multiplying out the polynomial solutions.

There must be no polynomial factor common to the pair (a,b). If this is the case then there is no solution.

Cite As

Tom Moir (2026). Polynomial Diophantine solver (https://www.mathworks.com/matlabcentral/fileexchange/73755-polynomial-diophantine-solver), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Polynomials in Help Center and MATLAB Answers
Version Published Release Notes
1.1.0

Just a few spelling errors

1.0.0