Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

another issue with MmaToMaple

25 views
Skip to first unread message

Peter Pein

unread,
Aug 11, 2012, 4:24:42 AM8/11/12
to
sigh...
when i paste the text below into the "Mma input" part of the maplet's
window and click "Translate" then I get a strange message:
Title reads: "Unable to translate" and the message is: "Invalid terms in
product: 1"???

My question is: why is 1 an invalid term in a product?

entering 1*1 gives no error (but there are two terms equal to 1)

TIA,
Peter

P.S: the exact copy of the input:
df[a_?NumericQ, n_Integer] :=
Block[{n0 = Ceiling[a/Pi],
ak = (-1)^(#1 + Floor[n/2]) Piecewise[{{Sin, EvenQ[n]}}, Cos][
a/#]/#^n &},
Total[N[Array[ak[#, a] &, n0]]] +
NSum[ak[k, a], {k, n0 + 1, Infinity}]]

Axel Vogt

unread,
Aug 11, 2012, 9:55:44 AM8/11/12
to
I am using Maple 15. For simple cases the translator works, but I
never used it for MMA programs (and do not know, which versions or
constructs are covered).

For the above example I get a different reply:

"(your stuff from above)"; # i.e. entred as string to Maple
convert(%, FromMma); # should do the translation

results in

Error, invalid terms in product: df(`a_?NumericQ`,n_Integer) := 1

When I remove your line breaks (but not caring for blanks),
then I get something different and readable, but nothing
that Maple understands.
0 new messages