Questions tagged [maple]

Programming questions related to the computer algebra system Maple.

Maple is an interactive engineering and scientific programming environment, as well as a high level programming language, from Maplesoft, Inc. It is also the computational engine behind MapleSim.

The following links can be useful:

636 questions
72
votes
10 answers

What is the fastest integer factorization algorithm?

I've written a program that attempts to find Amicable Pairs. This requires finding the sums of the proper divisors of numbers. Here is my current sumOfDivisors() method: int sumOfDivisors(int n) { int sum = 1; int bound = (int) sqrt(n); …
Mithrax
  • 7,603
  • 18
  • 55
  • 60
18
votes
3 answers

3D curvefitting

I have discrete regular grid of a,b points and their corresponding c values and I interpolate it further to get a smooth curve. Now from interpolation data, I further want to create a polynomial equation for curve fitting. How to fit 3D plot in…
Syeda
  • 341
  • 2
  • 5
  • 14
8
votes
2 answers

Simplifying a very long symbolic expression by automatically introducing temporal variables or in any other way

After attempting to solve a symbolic math problem, I got an expression with about 17000 characters. I am using the symbolic toolbox for Matlab, but I am open to any suggestion (Mathematica, whatever). For obvious reasons, I won't copy-paste the…
Andrey Rubshtein
  • 20,795
  • 11
  • 69
  • 104
7
votes
4 answers

Finding the shortest repetitive pattern in a string

I was wondering if there was a way to do pattern matching in Octave / matlab? I know Maple 10 has commands to do this but not sure what I need to do in Octave / Matlab. So if a number was 12341234123412341234 the pattern match would be 1234. I'm…
Rick T
  • 3,349
  • 10
  • 54
  • 119
6
votes
2 answers

How to import GIF files into Beamer presentation?

I need to import animations from Maple into my LaTeX/Beamer presentation. I save a file in GIF format. But later I have problems converting that file into PNG. All I get is a static PNG file and can't proceed ((( What's the full code to do that in…
selegnasol
  • 91
  • 1
  • 2
  • 6
6
votes
2 answers

Efficient way to take determinant of an n! x n! matrix in Maple

I have a large matrix, n! x n!, for which I need to take the determinant. For each permutation of n, I associate a vector of length 2n (this is easy computationally) a polynomial of in 2n variables (a product of linear factors computed recursively…
Daniel
  • 944
  • 1
  • 7
  • 24
6
votes
1 answer

An algorithm for checking if a nonlinear function f is always positive

Is there an algorithm to check if a given (possibly nonlinear) function f is always positive? The idea that I currently have is to find the roots of the function (using newton-raphson algorithm or similar techniques, see…
5
votes
1 answer

How to know which Maple command automatically maps on list entries or not?

In Mathematica, almost all commands automatically thread (or map) over a list. In Maple, how does one determine which command automatically acts over entries of a list or a set? For example: y+p*x=2*sqrt(x*y); r:=[solve(%,y)]; This gives list of…
Nasser
  • 12,849
  • 6
  • 52
  • 104
5
votes
1 answer

How can I programatically truncate order "O" terms in Maple?

In Maple, taylor(exp(x),x,2); returns 1+x+O(x2). How can I automatically convert this result to the same expression with the O(x2) terms removed? I.e. something like removeBigO(taylor(exp(x),x,2)); to return 1+x?"
Douglas B. Staple
  • 10,510
  • 8
  • 31
  • 58
5
votes
3 answers

How to convert a Maple expression x*y to Matlab for the result x.*y?

A Maple expression (for example, x^3+x*y) can be converted to Matlab by with(CodeGeneration): Matlab(x^3+x*y); However, in Matlab, there are two kinds of product: A*B and A.*B. The above way will give x^3+x*y. Is there a convenient way to get the…
renphysics
  • 269
  • 1
  • 3
  • 7
4
votes
1 answer

How to load a package in Maple?

I want to use a package called "ESC" elliptic surface calculator that can be uploaded with Maple. The instructions from the creator are: Save as a text file with character encoding ISO-8859-1 (ISO Latin 1) and load within Maple using "read"…
user371596
  • 75
  • 3
4
votes
2 answers

Maple 13: how to turn true into 1 and false into 0?

generaly what I need is type transformation instructions to be capable of for example multipliiing on true like 5 * true and get5 of say x * false and get 0. How to do such thing?
Rella
  • 65,003
  • 109
  • 363
  • 636
4
votes
1 answer

"GenerateMatrix" equivalent command in SymPy

In Maple there is a command "GenerateMatrix" that will take a collection of linear equations and generate a symbolic matrix A and symbolic vector b in "Ax=b" where "x" is a vector of variables specified by the command. The help page can be found…
John
  • 791
  • 1
  • 6
  • 22
3
votes
4 answers

snprintf crash when displaying %d or %u

I'm trying to print an integer into a string with snprintf for display on an OLED display from an ARM micro. However, when I use %d or %u the micro locks up and stops executing. Using %x or %c works fine, but the output isn't much use. What could…
aliask
  • 133
  • 1
  • 7
3
votes
1 answer

How can I change an element in a matrix in Maple?

The question is: How can I change an element in a matrix in Maple? Is it possible?
brugerfuglen
  • 31
  • 1
  • 2
1
2 3
42 43