Joe Riel

9630 Reputation

23 Badges

19 years, 246 days

MaplePrimes Activity


These are answers submitted by Joe Riel

The preceding export to the module definition is nonsensical, in context.  Eliding it cleans up the message.  You could wrap the code in an outer module declaration, so the the use of export makes sense.

Here's a hackish solution.  It's simple, not robust, but it should generally work for this particular case (pdf and dvi files).

FileTools:-ListDirectory(currentdir(), :-select = "*.[dp][dv][if]");

The forward-quoting of the types need to be adjusted.  One solution is
 

test := proc(V::{And(Vector(1),satisfies( v->type(v[1],'Vector[:-column](3)') ) ),
                 And(Vector(1),satisfies( v->type(v[1],'Vector[:-row](3)') ) )})
    print("works");
end proc:

 

StringTools:-Remove is not the procedure you want to use; it is for removing characters from a string.  What you want is probably
StringTools:-Subs(["\\begin{array}{ccc}" = ""], s);

The procedure CodeTools:-Profiling:-Profile can be used to record the number of times a procedure is called.

From the output I'll guess you are located fairly close to Maplesoft; there aren't many hops and they seem reasonably short. On my system there a few more hops, they are longer, and I can see the switch from the US sites to the Canadian sites.

See ?plot,details.  You can use the 'view' option or specify the y-range with an additional range.
plot(x, x=1..2, 'view'=[1..2, -1..2]);
plot(x, x=1..2, -1..2);

In module A, s has to be an export, not a local.

The call `<,>`(a,b,c) is somewhat equivalent to Vector[column]([a,b,c]) and `<|>`(a,b,c) to Vector[row]([a,b,c]). The actual procedures are mainly builtin, but you can inspect the non-builtin part by doing

interface('verboseproc'=3):
print(`<,>`):
print(`<|>`):

The help page for Vector describes the row and column options.

Pi/3 is not an integer (in the range 0..10), so fails in u[i,Pi/3]:=0;

CodeTools:-Profiling takes the procedure you want to profile as an argument. You are passing a call to PickAngles.  Try

with(CodeTools:-Profiling):
Profile(PickAngles):
PickAngles(...);  # appropriate call to exercise the procedure
PrintProfiles(PickAngles);

 

Not clear that this will help, but in the Logic package you can use &iff. To get the desired looking expression you could do

with(Logic):
(&not (P &or Q)) &iff ((&not P) &and (&not Q));

See the help page ?Logic,operators.

You could try using kernelopts('bytesused'). 

It wasn't designed to.  It could be extended but would it be useful?  You can use

Describe~([sin,cos,tan]):

Your example isn't ideal in that Describe(1) also fails, with a different error.

The debug button is only active when Maple is computing.  To test it, run the following code in a Maple worksheet.

proc()
    for local cnt do
       Threads:-Sleep(1);
       print(cnt);
    end do;
end proc();

While it's executing, the debug button should become active.  Press it. The interactive debugger will open.  Click the next button in the debugger a few times to step through the code, then click the quit button.

1 2 3 4 5 6 7 Last Page 1 of 114