Be the first to rate this file! 10 Downloads (last 30 days) File Size: 1.25 KB File ID: #33214

Polynomial division - derived form covolution

by

 

10 Oct 2011 (Updated )

Polynomial division is derived directly from convolution.

| Watch this File

File Information
Description

For the division of univariate polynomials, given the dividend b(x) of degree n and the divisor a(x) of degree m, such that b(x) = q(x)*a(x) + r(x), the quotient q(x) of degree n-m and the remainder r(x) of degree m-1 are then obtained.

This very short code is similar to the MATLAB built-in function 'deconv.m'.

The presented routine [q,r] = poly_div(b,a) can avoid the un-wanted data preceeding the remaider's coefficients applying the built-in routine [q,r] = deconv(b,a). See author's self comment.

Acknowledgements

Polynomial Division By Convolution Quotient And Reminder inspired this file.

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
11 Sep 2012 Feng Cheng Chang

Self comment:
For example,
>
> b = [2 7 -5 9 -3], a = [3 -5 9 -2],
b =
2 7 -5 9 -3
a =
3 -5 9 -2

> [q,r] = poly_div(b,a),
q =
0.66667 3.4444
r =
6.2222 -20.667 3.8889

> [q,r] = deconv(b,a),
q =
0.66667 3.4444
r =
0 -8.8818e-016 6.2222 -20.667 3.8889
>
It shows that running the MATLAB built-in routine yields the unwanted data, even it is very very small.

Updates
10 Sep 2012

Update the m-file.

14 Dec 2012

Shorten the m-file.

Contact us