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:

583 questions
65
votes
9 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,053
  • 17
  • 52
  • 58
17
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
  • 309
  • 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,267
  • 10
  • 64
  • 102
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,125
  • 9
  • 43
  • 101
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
  • 934
  • 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,002
  • 5
  • 38
  • 92
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
  • 59,216
  • 102
  • 341
  • 614
4
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
  • 9,162
  • 6
  • 27
  • 53
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
  • 7
3
votes
1 answer

iteration using the secant method with a tolerance

I am trying to find out how many iterations it takes when I run a secant iteration up to a certain tolerance in maple. However, I am receiving an error code, so if someone could point out where the mistake is in my code, I would really appreciate…
3
votes
1 answer

size of a set in Maple

Sorry for my dumb question, but how can I get the size of a set (the max index number)? Is there a built in function, or i have to count it in a loop?
user408141
1
2 3
38 39