No BSD License  

Highlights from
SYM2POLYS

4.5

4.5 | 2 ratings Rate this file 1 Download (last 30 days) File Size: 1.08 KB File ID: #5822

SYM2POLYS

by Mukhtar Ullah

 

02 Sep 2004 (Updated 24 Aug 2006)

Improved version of Sym2Polys (by Paul Godfrey).

| Watch this File

File Information
Description

Sym2Polys (by Paul Godfrey) cannot be run on MATLAB 7(Release 14). This function is an extension of the Matlab SYM2POLY and COEFFS functions in that it allows the coefficients to be symbolic and returns the full coefficient vector including the zero coefficients.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Sym2Polys

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
07 Jul 2006 udhaya kumar

There is some problem in the function coeffs which makes this m file a problem for eg if p =s^6+2*s^5+5*s^4+2*s^3+9*s^2+10*s+12 then is returns c =[2 5 2 1 9 10 12] which is wrong

24 Aug 2006 Mukhtar Ullah

udhaya kumar,
Thanks for detecting this bug. I have uploaded the bug-fixed version today. It should appear soon in this ML exchange.

31 Oct 2007 Noviar Ferguson

It helps me a lot!
Thank you very much!!! =)

23 Mar 2010 kostas

Dear Mukhtar,

I was wondering if it is possible to add a new feature to sym2polys.m file, that is to return the coefficients vector (including the zeros) for multivariable polynomials in the format p = a*P1 + b*P1^2 + c*P2 + d*P3^2 + ..., etc

For example, if v is a multivariable (P0001, ..., P0020) monomial v = 64*P0001 + 400*P0010 + 80*P0002 + 336*P0011 + 1218*P0020 + 25*P0003 then with your function sym2polys(v) returns

[ 64, 400*P0010 + 80*P0002 + 336*P0011 + 1218*P0020 + 25*P0003]

instead of

[ 64, 80, 25, 0, 0, 0, 0, 0, 0, 400, 336, 0, 0, 0, 0, 0, 0, 0, 0, 1218]

Please let me know if you can add susch a feature.

Thanks in advance, kostas

Please login to add a comment or rating.
Updates
07 Sep 2004

the help documentation has been corrected.

11 Feb 2005

improved documentation

24 Aug 2006

Fixed a bug detected by Udhaya Kumar

Tag Activity for this File
Tag Applied By Date/Time
symbolic math Mukhtar Ullah 22 Oct 2008 07:31:03
symbolic coefficients Mukhtar Ullah 22 Oct 2008 07:31:03
multivariate polynomial Mukhtar Ullah 22 Oct 2008 07:31:03
mathematics Mukhtar Ullah 22 Oct 2008 07:31:03

Contact us at files@mathworks.com