 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] How to force a common factor from a simbolic matrix
| [MUG] How to force a common factor from a simbolic matrix |
|
Author: Nicolai Sirbu
Posted: Sun, 28 Jul 2002 12:00:38 +0300
|
>> From: "Nicolai Sirbu" "nsirbu"
Hy everyone,
I performe several matrix simbolic computations and the result is a matrix.
Analysing the result matrix there are obvious terms that can be put in the
front of the matrix as common factors. How can i do that (what's the maple's
command to do such thing)?
Thanks in advance
|
| [MUG] Re: How to force a common factor from a simbolic matrix |
|
Author: Edwin Clark
Posted: Mon, 05 Aug 2002 15:09:50 -0400
|
>> From: Edwin Clark "eclark"
On Sun, 28 Jul 2002, Nicolai Sirbu wrote:
> I performe several matrix simbolic computations and the result is a matrix.
> Analysing the result matrix there are obvious terms that can be put in the
> front of the matrix as common factors. How can i do that (what's the maple's
> command to do such thing)?
Here's a procedure that ought to do what you want:
> factor_out:=proc(A)
> local g,i,x;
> x:=ListTools[Flatten](convert(A,listlist));
> g:=gcd(x[1],x[2]):
> for i from 3 to nops(x) do
> g:=gcd(g,x[i]);
> end do:
> g*map(x->x/g,evalm(A));
> end proc:
Example:
> A:=matrix([[sin(2)*a,sin(2)*2*a],[sin(2)*3*a,sin(2)*4*a]]);
> factor_out(A);
[1 2]
sin(2) a [ ]
[3 4]
>
------------------------------------------------------------
W. Edwin Clark, Math Dept, University of South Florida,
http://www.math.usf.edu/~eclark/
------------------------------------------------------------
|
| [MUG] Re: How to force a common factor from a simbolic matrix |
|
Author: Robert Israel
Posted: Mon, 02 Aug 2002 09:08:35 -0700
|
>> From: Robert Israel "israel"
You might try "factrix" from my Maple Advisor Database,
http://www.math.ubc.ca/~israel/advisor.
Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
On Sun, 28 Jul 2002, Nicolai Sirbu wrote:
> Hy everyone,
> I performe several matrix simbolic computations and the result is a matrix.
> Analysing the result matrix there are obvious terms that can be put in the
> front of the matrix as common factors. How can i do that (what's the maple's
> command to do such thing)?
> Thanks in advance
>
|
Previous by date: [MUG] Solving equations with radicals, PierLuigi Zezza
Next by date: [MUG] A bug?, Emilio Sanchez
Previous thread: [MUG] Re: package for dynamics and nonlinear control, Jason Schattman
Next thread: [MUG] A bug?, Carl Eberhart
|
|
|