tijgertron

68 Reputation

6 Badges

14 years, 251 days

MaplePrimes Activity


These are questions asked by tijgertron

I just copied this from the Maple 14 documentation

f := proc( { [color,colour]::symbol := RED } )
    sprintf("color=%a   colour=%a", color, colour)
end proc;

to get

"Error, invalid procedure parameters"

Anyone any ideas? It's the same in Maple 12 and 13.

Hello again!

I am writing a procedure of which the body is done, I "only" need to take care of the input in a clever way, which is where I'm stuck. I want to make it as simple as possible for the end user. The procedure has the following parameters:

- 2 matrices of type 'Matrix' [required], say A and B

- either a list L (default []) or a symbol S (but one of them is required)

- an optional symbol v::symbol:=t

What's the best way of handling these?

I have a matrix (M) and it has both 0 and 1 as entries. I want to have a sequence/list of all indices associated with the entries equal to one (the others are irrelevant to me). I can use a nested for loop with an if statement, but I find that the easy way out and not very pretty. Is there is more sophisticated way, hopefully faster way of achieving this (using sequences, attributes, select/remove)?

Example:

M:=Matrix([[1,1,0],[0,0,1],[1,0,1]]);

Hi there!

Suppose I have an expression

Expr:=a*f(x[0],...) + b*f(x[1],...) + c*f(x[2],...),  

where the ellipses represent (different) functions of x[0]..x[2]. I'd like to use frontend to get the coefficients a, b, c corresponding to x[0], x[1] and x[2]. If the function f only has one argument, that's peanuts:

Hi everyone!

Based on a recent post ( www.mapleprimes.com/forum/partialsubstitutionfrontendfreeze ) I have the following piece from a Maple worksheet, which I do not understand. First, I define A and B, where A is supposed to be substituted into B. If I have a "p" in A, then I get a "subs" as variable in B after frontend/curry with subs:

1 2 Page 1 of 2