List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Suggestion to Maple development group: add MatrixDE()
| [MUG] Suggestion to Maple development group: add MatrixDE() |
|
Author: Rouben Rostamian
Posted: Thu, 30 Jan 2003 20:40:17 -0500
|
>> From: "Rouben Rostamian" "rostamian"
I hope that someone in the Maple development groups is reading this.
Let A be a square matrix of constants and consider the system of
differential equations:
x' = A x.
We can obtain the general solution by:
with(linalg):
with(DEtools):
A := matrix([[3,1],[1,3]]): # example
matrixDE(A,t);
[exp(2 t) exp(4 t)]
[[ ], [0, 0]]
[-exp(2 t) exp(4 t)]
But this won't work if the coefficient matrix A is defined using the
"LinearAlgebra" package instead of the "linalg" package, because
matrixDE() expects a "matrix" rather than a "Matrix" as its first
argument.
To get around this, we may convert from "Matrix" to "matrix" using
the convert() command:
with(LinearAlgebra):
with(DEtools):
A := Matrix([[3,1],[1,3]]): # example
matrixDE(convert(A,matrix), t);
which produces the same solution as above, as it should. The syntax,
however, is needlessly clunky.
It would be nice to add a function MatrixDE() to the DEtools package
which will work just like the existing matrixDE(), but which will
accept a "Matrix" as its argument.
--
Rouben Rostamian "rostamian"
|
| [MUG] Re: Suggestion to Maple development group: add MatrixDE() |
|
Author: Carl Devore
Posted: Sat, 15 Feb 2003 04:13:58 -0500
|
>> From: Carl Devore "devore"
On Thu, 30 Jan 2003, Rouben Rostamian wrote:
> with(DEtools):
> A := matrix([[3,1],[1,3]]): # example
> matrixDE(A,t);
>
> But this won't work if the coefficient matrix A is defined using the
> "LinearAlgebra" package instead of the "linalg" package, because
> matrixDE() expects a "matrix" rather than a "Matrix" as its first
> argument. To get around this, we may convert from "Matrix" to
> "matrix" using the convert() command:
>
> with(DEtools):
> A := Matrix([[3,1],[1,3]]): # example
> matrixDE(convert(A,matrix), t);
>
> which produces the same solution as above, as it should. The syntax,
> however, is needlessly clunky.
>
> It would be nice to add a function MatrixDE() to the DEtools package
> which will work just like the existing matrixDE(), but which will
> accept a "Matrix" as its argument.
It is such a triviality, why not write MatrixDE yourself and save it to a
personal library.
> MatrixDE:=
> ()-> DEtools[matrixDE](convert(args[1], matrix), args[2..-1]);
Also, you do not need to load linalg in order to use matrix nor do you
need to load LinearAlgebra in order to use Matrix.
|
Previous by date: [MUG] Re: plotting colors in maple, Robert Israel
Next by date: [MUG] differental operators, Richard Patterson
Previous thread: [MUG] Maple Automata package, Vesa-Matti Sarenius
Next thread: [MUG] differental operators, Richard Patterson
|