roman_pearce

Mr. Roman Pearce

1678 Reputation

19 Badges

20 years, 217 days
CECM/SFU
Research Associate
Abbotsford, British Columbia, Canada

I am a research associate at Simon Fraser University and a member of the Computer Algebra Group at the CECM.

MaplePrimes Activity


These are replies submitted by roman_pearce

Help files would be hard but mw files would, in theory, be easy. The question is how many users would really use it.
Actually, this is exactly the right place :) Maplesoft has a new product, and you can download a free beta version: The Maple Toolbox for Matlab. This is a replacement for the symbolic toolbox for Matlab, which was based on Maple 8. The functionality you are interested in was added for Maple 10.
Actually, this is exactly the right place :) Maplesoft has a new product, and you can download a free beta version: The Maple Toolbox for Matlab. This is a replacement for the symbolic toolbox for Matlab, which was based on Maple 8. The functionality you are interested in was added for Maple 10.
You've definitely got a strange problem, and it's probably specific to your setup. You are for sure running 32-bit Suse Linux and 32-bit Maple on an Opteron ? Contact the company, and also try the standard interface and see if it loads your worksheet any faster.
I have a couple of remarks which should hopefully bring the issues you point out into focus. First, the Maple kernel is actually very small. It implements only a few mathematical algorithms (such as normal). For the most part, it's job is to implement data structures: sums, products, hash tables, rtables, etc, and the Maple programming language: procedures, branching, loops, as well as other primitives such as integer and finite field arithmetic. For a reference I suggest the book "Algorithms for Computer Algebra" by Geddes, Czapor, and Labahn, as well as the Maple programming guides distributed with the full version of Maple. You can download the programming guides here. These are all good introductions to the data structures implemented in the Maple kernel. About 90% of the mathematical functionality of Maple is written in the Maple language, making the system extremely flexible. You can build almost anything on top of the Maple kernel, and people often do. There are programs and packages for roughly every area of mathematics, including some very specialized areas, and routines for engineering, the life sciences, and education as well. These are all written in the Maple language, and they are bolted on to the system, often independently of oneanother. This includes things like mathematical functions and types (!). The actual development of Maple is spread across labs all over the world, for example, in Moscow, Paris, Vancouver, London Ontario, and of course Waterloo. These labs contribute most of the specialized packages and routines. The Maplesoft company maintains and enhances the core routines (such as simplify, int, solve, etc), develops the Maple kernel, and oversees development of the system as a whole. The picture I'm trying to paint here is that Maple is more like an organic ecosystem than a monolithic product. The company has built a platform and it supports many different (and sometimes competing) development efforts. The advantage of this approach is that the good routines win out over the long term, and the product is allowed to evolve and adapt to new uses quickly. This is the reason why Maple is so widely installed - there is almost always something useful that it does. The downside of this approach is that it is chaotic. Old parts of the system don't seem to know about new functionality, and some newer parts occasionally conflict. Long-term users of Maple accept this, and complain to the company endlessly about what needs to be fixed. The important thing is that the company actually does fix things, so that over time some coherence begins to emerge. The added benefit is that the product is developed in a direction that is influenced strongly by users. As for your specific complaint, it looks like you found a rough spot in the system. The old linalg package (which uses vectors and lower-case matrix) was replaced by the LinearAlgebra and VectorCalculus packages (which use Vector and Matrix). There is an incompatibility there because the VectorCalculus package supports a more general notion of Vector (including, for example, cylindrical and spherical coordinates) that don't make sense outside of that package. Where possible, you should try to stay within the VectorCalculus package if you are using those kinds of features. For example, instead of a list try to use a Vector of functions. For functions which do not understand Vectors (such as int), use the map command to apply the function to each element. For something more complicated (such as surface integrals) you will have to write your own procedures if it is not built in to the system. Usually these are not too difficult to write, but post details (or better yet, an example calculation) if you need suggestions.
This is very strange. Classic is sometimes very slow opening mw files, but for mws it really should be fast. Can you post any of the worksheets online (ie: using MaplePrimes file manager) so that others can try to reproduce the problem ? You should probably contact Maplesoft's technical support as well.
Are the matrices sparse ?
You mean you have a polynomial system like {3*x^2 + 2*y - 1, x*y + 2} where x and y are square matrices ? I'm not sure. Most software can compute Groebner bases for modules, and you could expand this into a module problem, but I think you'd be better off to compute a (non-commutative) Groebner basis first, then expand each equation to solve them one by one. I'm not sure about this, I've never done it before.
You mean you have a polynomial system like {3*x^2 + 2*y - 1, x*y + 2} where x and y are square matrices ? I'm not sure. Most software can compute Groebner bases for modules, and you could expand this into a module problem, but I think you'd be better off to compute a (non-commutative) Groebner basis first, then expand each equation to solve them one by one. I'm not sure about this, I've never done it before.
The best data structure in Maple is the hash table. Lists and sets are ok, but you should not repeatedly modify individual elements. Use the map command to apply a function to every element in a list or set. Sets are useful because they automatically remove duplicates, however they have the overhead of sorting (by machine address) relative to lists.
Types in Maple are fully extensible. Make a procedure `type/fst` which checks your type. For example:
`type/fst` := proc(L)
   type(L,'listlist') and nops(L)=2 and 
   andmap(proc(a) evalb(a <= 1 and a >= 0) end proc, L[1])
end proc;

type( [[0.2, 0.3], [x,y]], fst);
type( [[0.2, 2], [x,y]], fst);
Note that the type listlist checks for a list of lists, where all sublists have the same length. This won't work for printing however. In Maple you can only define how to print a function. Your solution is to make a new function with two arguments (the two lists), for example FST([0.2, 0.3], [x,y]); The lists will get passed to a printing procedure `print/FST` if it exists.
f := FST([0.2, 0.3], [x,y]);  # example object

`print/FST` := proc(a, b) local i;
  [seq(b[i][a[i]], i=1..nops(a))]
end proc:

f;  # look

`type/FST` := proc(f)
   type(f, 'function') and op(0, f)='FST' and nops(f)=2 and type([op(f)], 'listlist') and 
   andmap(proc(a) evalb(a >= 0 and a <= 1) end proc, op(1,f))
end proc:

type(f, FST);
g := FST([0,2], [x,y]);  # note: still gets printed
type(g, FST);
I hope this gets you started.
Problems like this can be really hard to nail down. It can even be a combination of the driver and the way Maple interacts with it. If you want to track down the problem, try running a few OpenGL games (ex: Doom Legacy) from your user account. Any Java OpenGL demos would be good to try as well. If you have problems, head over to the ATI support forums - they are likely to have a solution.
As a temporary fix, you can try turning off hardware acceleration in plots. It doesn't make that big of a difference on a fast computer. I'm going from memory here, but I believe on Windows it is under Tools->Options in the Display tab.
If you're working with matrices of polynomials, you may want to try the MatrixPolynomialAlgebra *package*. There doesn't seem to be a command to do exactly what you want so you'll have to write your own or use the one below. Note that the answer is not unique.
mdegree := proc(A::Matrix, x)
  local n,m,i,j,res;
   n,m := op(1,A);  # dimensions
   res := [degree(A[1,1],x), A[1,1], [1,1]];
   for i to n do 
     for j to m do
       if degree(A[i,j],x) > res[1] then
         res := [degree(A[i,j], x), A[i,j], [i,j]]
       end if
     end do
   end do;
   res;
end proc;
It's unlikely that you will be able to hack your Maple installation to get it to work. By "system restore" do you mean you rolled back the operating system to a previous date, or did you completely wipe it out ?
First 29 30 31 32 33 34 35 Last Page 31 of 39