Rank: 671 based on 189 downloads (last 30 days) and 13 files submitted
photo

Feng Cheng Chang

E-mail
Company/University
Allwave Corporation
Lat/Long
33.853737, -118.36573

Personal Profile:

Professor,
Senior Scientist,
Ph. D. in E.E., University of Alabama,
IEEE Life member,
Retired

Professional Interests:
mathematics, EM waves, Antennas

 

Watch this Author's files

 

Files Posted by Feng Cheng View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
15 May 2014 Polynomials with multiple roots solved Solving multiple roots polynomial, using simple elementary arithematic operations mostly. Author: Feng Cheng Chang polynomial roots poly... 20 6
  • 5.0
5.0 | 2 ratings
22 Apr 2013 Making square matrix singular. Making any given non-singular square matrix singular by perturbing with prescribed distribution. Author: Feng Cheng Chang square matrix, inverse matrix, determinant, vector product, pertubation, data distribution 7 0
14 Dec 2012 Polynomial division - derived form covolution Polynomial division is derived directly from convolution. Author: Feng Cheng Chang long polynomial divis..., synthetic polynomial ..., convolution polynomia... 14 1
30 Nov 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang square matrix, inverse matrix, determinant 23 11
  • 3.0
3.0 | 4 ratings
07 Jul 2011 Polynomial division by convolution -- up to finite terms Division of two polynomials by convolution to get up to K terms. Author: Feng Cheng Chang linear algebra, polynomial division, longhand division, convolution matrix 15 0
Comments and Ratings by Feng Cheng View all
Updated File Comments Rating
14 May 2014 Polynomials with multiple roots solved Solving multiple roots polynomial, using simple elementary arithematic operations mostly. Author: Feng Cheng Chang

Reply to Bor Plestenjak:

Thank you for your pinpoint the bug.

It should be OK if the file is correct as follows: In line 15, change
from
" if npo == 1, return, end;"
to
" if npo == 0, return, end;"

I will update this file later. But please try again now!

14 Nov 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang

Thank you for all of your comments, John and Jan. Afterall I have decided to continue instead of giving up. Here, I want to say thank again to the encouragement from Jan.

The presentation in File Exchange is now updated to include two files: inv0.m and inv0det_pvt.m.

(1) AI = inv0(AO) -- Find AI(inverse) directly from AO(given matrix) without any pivoting. The code is only 4 statement lines total.

(2) [AI,det] = inv0det_pvt(AO,pvt) -- Find both AI and det(determinant) from AO, with or without pivoting. The "write-in" is used for the pivoting (pvt = 2). It is only good for AO of small order and not practical at all. However it may resolve the problem when the divisor 'd' in the k-loop is zero or close to zero. Such as d=AO(1,1)=0.

The option of automatic pivoting with the preset critique is the way to proceed. I think the critique for pivoting is to select the pivoting element such that the divisor d is the absolute maximum among all computed d's. If the value of d, resulted from the selected pivoting element, is zero or close to zero, then the given matrix AO must be singular.

Anyway the derived algorithm for matrix inversion is very pratical compare to some other classical approaches, such as Gauss-Jordan Elimination. I hope our FEX users will like to use it.

I am not majored in mathematics. I am retired now and soon approach to 80. I need some help regarding the option for automatic pivoting.

03 Nov 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang

Thank you again for your comments. Afterward I do not expect people would want to use my code at all, since the MATLAB functions 'inv' and 'det' have already been here to be used conveniently. However, it does not show how these built-in functions are developed, such as by co-factors, eigenvalues, Guanssian elimination, etc. Perpaps, this is why people like to develop their own codes.

Sometimes, people want to derive his own routine that may be better than the built-in one in some extent. For example, the routine 'polyroots' presented in Mathworks Files Exchange is
more suitable than the built-in function 'roots' for any given polynomials with many high multiple roots.

If anyone like to develop his own codes about the inverse and determinant of a given square matrix, he may do it by applying the approach used in my code. It is very siple and straightforward, and only six statement lines.

Finally, the errors have been found during repeatly running the code
with pvt = 1 option. It will yield the determinant of correct
absolute value but with different sign, either + and - . It needs to be corrected.

I may withdraw this contribution if I feel no good.

02 Nov 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang

I do appreciate John's comments, so that I am to force myself to do some further homework. Hope it will give him some answers but not expect all.

The code is now updated to include the pivoting scheme. There are three options to choose:
(1) pvt=0 ---> no pivoting,
(2) pvt=1 ---> pivoting elements randomly selected,
(3) pvt=2 ---> pivoting elements by writing-in.

If the very first element of the given square matrix is zero, it does surely fail for option(1), but it will be OK by sucessively running either option(2)or(3) for any non-singular matrix.

The code derived is very short (10 lines for the original and less than 30 for the updated). Yet it will give both inverse and determinant of a given square matrix.

After all, nothing is completely perfect.

31 Oct 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang

If the run fails due to det = 0 at any stage, please try the following added routine:

function [AI,det,er] = inv_det_pij(AO,pij)
if nargin < 2, AO = AO(pij(:,1),pij(:,2)); end;
[AO,det,er] = inv_det(AO);
if nargin < 2, AO(pij(:,2),pij(:,1)) = AO; end;

where the input 'pij' is nx2 array to modify the given matrix such that the diagonal elements are all replaced.

For example,

>> A=[0 1 2; 3 4 5; 6 7 8], pij=[2 1; 3 2; 1 3], Ap=A(pij(:,1),pij(:,2)),

A =
0 1 2
3 4 5
6 7 8
pij =
2 1
3 2
1 3
Ap =
3 4 5
6 7 8
0 1 2

Comments and Ratings on Feng Cheng's Files View all
Updated File Comment by Comments Rating
14 May 2014 Polynomials with multiple roots solved Solving multiple roots polynomial, using simple elementary arithematic operations mostly. Author: Feng Cheng Chang Plestenjak, Bor

The correction works for the reported problem, but, there is more. For instance, for p=[3e-04 1e-09 1e-09 5e-08 2e+04] results are wrong and in addition multiplicities appear as complex numbers.

14 May 2014 Polynomials with multiple roots solved Solving multiple roots polynomial, using simple elementary arithematic operations mostly. Author: Feng Cheng Chang Chang, Feng Cheng

Reply to Bor Plestenjak:

Thank you for your pinpoint the bug.

It should be OK if the file is correct as follows: In line 15, change
from
" if npo == 1, return, end;"
to
" if npo == 0, return, end;"

I will update this file later. But please try again now!

14 May 2014 Polynomials with multiple roots solved Solving multiple roots polynomial, using simple elementary arithematic operations mostly. Author: Feng Cheng Chang Plestenjak, Bor

There seems to be a bug when it comes to linear polynomials (which of course can not have multiple zeros). poly_roots([1 2]) does not return a zero and poly_roots([1 1 0 0 0]) returns just the triple zero 0.

19 Nov 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang çilsalar, hüseyin

14 Nov 2012 Inverse and determinant of square matrix Inverse and determinant of a square matrix are determined using only simple matrix multiplication Author: Feng Cheng Chang Chang, Feng Cheng

Thank you for all of your comments, John and Jan. Afterall I have decided to continue instead of giving up. Here, I want to say thank again to the encouragement from Jan.

The presentation in File Exchange is now updated to include two files: inv0.m and inv0det_pvt.m.

(1) AI = inv0(AO) -- Find AI(inverse) directly from AO(given matrix) without any pivoting. The code is only 4 statement lines total.

(2) [AI,det] = inv0det_pvt(AO,pvt) -- Find both AI and det(determinant) from AO, with or without pivoting. The "write-in" is used for the pivoting (pvt = 2). It is only good for AO of small order and not practical at all. However it may resolve the problem when the divisor 'd' in the k-loop is zero or close to zero. Such as d=AO(1,1)=0.

The option of automatic pivoting with the preset critique is the way to proceed. I think the critique for pivoting is to select the pivoting element such that the divisor d is the absolute maximum among all computed d's. If the value of d, resulted from the selected pivoting element, is zero or close to zero, then the given matrix AO must be singular.

Anyway the derived algorithm for matrix inversion is very pratical compare to some other classical approaches, such as Gauss-Jordan Elimination. I hope our FEX users will like to use it.

I am not majored in mathematics. I am retired now and soon approach to 80. I need some help regarding the option for automatic pivoting.

Contact us