Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

20 years, 309 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

To find the sum, one can use Maple function sum, and I posted an example of using it for f above. There are other examples in the ?sum help page.

Alec

To find the sum, one can use Maple function sum, and I posted an example of using it for f above. There are other examples in the ?sum help page.

Alec

What code?

Alec

What code?

Alec

Well, if it works as designed, then it is a bug in design, I would say.

Especially in the situation when the sort version can not be changed from within the session.

Alec

Well, if it works as designed, then it is a bug in design, I would say.

Especially in the situation when the sort version can not be changed from within the session.

Alec

plot(sol,t=0..5);

plot(s,0..5);

Alec

plot(sol,t=0..5);

plot(s,0..5);

Alec

It's easier to read lines from the end of the logfile to the beginning, i.e. using tac instead of cat. Then the stack is not needed - just add 1 to cnt for each exit, subtract 1 for each enter if cnt is positive, or print that enter line if cnt is 0.

Here is the awk two-liner,

$ tac test | awk '{if ($1=="<--") c++
if ($1=="{-->") if (c>0) c--; else print $0}'

Alec

I've just meant to say that the same could be done in script. In particular, in Dave Linder's example,

--------------script--------------
#!/bin/bash
echo "$2($3,$4);" | maple -qi $1.mpl
----------------/script--------------

Then, in the shell

./script foo bar 1/6 Pi
                                    1/2

Arguments could be passed similarly. For instance,

-------------mymaple---------------
#!/bin/bash
echo "nargs:=$#-1: args:=parse~(StringTools:-Split(\"$*\")[2..]):"\
 | cat - $1 | maple -q
-----------------/mymaple--------------

----------------script1----------------
#!/usr/local/bin/mymaple
print(nargs);
print(args);
--------------/script1----------------

Then, in the shell,

$ ./script1 foo bar
                                       2

                                  [foo, bar]

Or avoiding Maple argument processing,

--------------mymaple----------------
#!/bin/bash
m=$1
shift
IFS=","
echo "nargs:=$#: args:=$*:" | cat - $m | maple -q
----------------------/mymaple----------------

Then

$ ./script1 foo bar
                                       2

                                   foo, bar

Is it (slightly) more interesting?

Alec

""||(op(1,evalf(Pi,20)));

                        "31415926535897932385"

Alec

""||(op(1,evalf(Pi,20)));

                        "31415926535897932385"

Alec

Just as the subject says.

Not that I am anxious - I, probably, won't post there if it will be a kind of Stack Overflow look and feel which I am not a fan of. Just curious.

Alec

It is calling the procedure with the same name from the NAG (Numerical Algorithms Group) dlls, written in C, which is much faster than processing using the code written in Maple, going through a lot of hooplas.

By the way, it is replaced with d01smc in the recent NAG libraries and is scheduled for removal in Mark 11 version of them - since I don't have Maple 14, I can't tell whether _d01smc works there, or not.

Alec

It is calling the procedure with the same name from the NAG (Numerical Algorithms Group) dlls, written in C, which is much faster than processing using the code written in Maple, going through a lot of hooplas.

By the way, it is replaced with d01smc in the recent NAG libraries and is scheduled for removal in Mark 11 version of them - since I don't have Maple 14, I can't tell whether _d01smc works there, or not.

Alec

First 26 27 28 29 30 31 32 Last Page 28 of 180