Product Tips & Techniques

Tips and Tricks on how to get the most about Maple and MapleSim
Occasionally Maple does not make me happy, if I want numerical integrals with more than the 14 digits which are supplied through the NAG libraries - that may be rather slow. So I wrote my own solution using LCC-WIN32 (a (free) compiler system allowing 104 decimal points of precision), where I coded the double exponential integration method. That gives me what I want to have in reasonable time. Details are sketched in the uploaded zip-file (it contains all what is needed to run the stuff). Some draw-back: this is for Windows only and because of OpenMaple at least Maple 9 is need.
Pari is a C library mainly for Number Theory, but it has excellent numerics, both real and complex case and with arbitrary precision. As it seems not to use much symbolics for that it is quite fast. This can be useful for some special functions or integration, see the appended example worksheets (and may be Linear Algebra a bit later these days).
I did that for matrix inversion:

Here is some stuff for doing that by calling Maple from Excel. The reason
is that one could care for extreme cases, where a really good precision
is needed. I included an example how to switch to rationals, where the
inversion can even be done exactly (do not use it for dimensions to high
and then it would be better to do it solely in Maple + cut&paste).
From time to time people ask on this site or elsewhere whether modules in Maple can be used the same way as objects in object oriented languages. The answer is yes and no. Yes - because OOP behavior can be simulated with modules - certainly not with full blown functionality, but still. No - because that is usually not the best way to do things in Maple. Here is an example of creating a type and an 'object' exploring it, with few 'methods'.
Recently, working on Nested Verification, I took a look at the whattype procedure. First, I couldn't find any use of local variables t1, t2, L, k1, k2 declared in it. That seems odd. Second, the order of types in it seems to be not exactly right. In particular, symbol is located earlier than `module`. Also, some types are missing, record for example. That leads to not recognizing modules and records,
r := Record( 'a', 'b' ):
m := module() end:
whattype(r);
                                symbol
whattype(m);
                                symbol
Similarly to the compact and efficient version of Nested Verification, I wrote a "compact and efficient" version of whattype,

Nested verification can be done in Maple using the following command,

VerifyTools:-AddVerification('nested'=proc(x,y,ver::verification)
if whattype(x)=whattype(y) then 
if x::Vector then verify(x,y,'Vector'('nested'(args[3..-1])))
elif x::Matrix then verify(x,y,'Matrix'('nested'(args[3..-1])))
elif x::Array then verify(x,y,'Array'('nested'(args[3..-1])))
elif x::array then verify(x,y,'array'('nested'(args[3..-1])))
elif x::set then verify(x,y,'set'('nested'(args[3..-1])))
elif x::list then verify(x,y,'list'('nested'(args[3..-1])))
elif x::relation then verify(x,y,'relation'('nested'(args[3..-1]))) 
elif x::range then verify(x,y,'range'('nested'(args[3..-1]))) 
else verify(x,y,args[3..-1]) fi 
else verify(x,y,args[3..-1])
fi end);

UPDATE!!! I found that my blogpost appers in Maple reporter. You should know, that this blogpost was just a question about how to solve my problem better. Alec Mihailovs gave me and aswer and his solution of testing nested objects is much better. If you still want to use my piece of code, you should remove "set object" form "convertAMVStolist" procedure and replace all occurrences of "hastype" with "type" (as mentioned in comments below).


This piece of code should be able to test two objects (not of every type) for equivalence (like testeq() does). The benefit is, that it should be able to test also nested objects. Is there any other and more simple way how to do that? How to test nested objects in sets?

Hi everyone, I am an undergraduate studying Stochastic Financial Modelling. I am currently writing up a simple brownian motion as shown on the attachment. I have difficulty in simulation a number of these paths and displaying 5 or so of them on the graph with the average path of all simulated paths. In this case, i would expect the average to be a straight line along the axis. Can anyone help me with this as i am only a novice in maple programming? Thanks, Steve
Hello i wonder whether its possible to solve elliptic pdes numerically in Maple10. I didnt succeed. I have a 2dim. poisson equation with the source term being the output from an other pde, i.e the source term can not be given in closed form so how to integrate this? i always get the message that Maple10 can not solve elliptic pdes Thanks for any ideas
The question of how to scale the x-axis with intervals of Pi has been raised on a number of occasions. Inspired by a contribution from Will, I produced the procedure and examples shown in the worksheet attached below. Hopefully, Maple users will find it useful. J. Tarr View 724_Pi axes.mw on MapleNet or Download 724_Pi axes.mw
View file details
Does anybody know why Maple's support of PDF is so poor? I posted a forum topic entitled "PDF support" in the past but didn't get any satisfactory answers. Suppose that I want to automatically generate a bunch of PDF files in Maple and manually saving each one as PDF isn't an option because it is too time consuming? Am I the only Maple user who has ever encountered this option? A search of the web seems to indicate that this is the case. I want to use Maple over Mathematica, but this is one issue that has prevented me from making the switch (permanently) so far. I am currently running Maple 10.04 for Mac on OS 10.4.8 on a G4.
restart:with(LinearAlgebra): L:=407: > L2:=convert(L,binary): > N:=length(L2): > T:=2^N-L: > TB:=convert(T,binary): > k:=length(TB): > T2:=convert(T,base,2): > T2V:=Vector[row]([T2,0$(N-k)]): > T2VC:=Vector[row]([1$N]): > T2V1:=VectorScalarMultiply(T2V,-1): > T2VA1:=VectorAdd(T2VC,T2V1): > ADDT:=Vector[row]([1,T2VA1]): > B_N:=Array(Hessenberg[lower],1..N+1,1..N+1,(a,b)->1): > C:=convert(B_N, Matrix): > Permanent(C): > delB:=DeleteRow(C,N+1..N+1): > B(L):=Matrix(N+1,N+1,[[delB],[ADDT]]): > Permanent(B(L));
Hi all, I am Using Maple 10. i am getting a frequent bug When i plot a 3d graph. Description: In a 3d plot, if i rightclick after rotating the graph, maple exits automatically. can somebody please tell me what's the problem? Thank you Divahar.J Indian Institute of Science, Bangalore, India.
convert(407,binary); 101100111 I want the vector [1,0,1,1,0,0,1,1,1]. I don,t make this. Please help me!
I just posted this application to the Maple Application centre, and thought that MaplePrimes users may be interested in seeing it. The title is Convolution of Finite Discrete Signals Tutorial and is designed to be a tutorial for students in a Singals and System course. Here is a screenshot: You can give the worksheet a try on MapleNet or Download it and try it out on your computer.
First 57 58 59 60 61 62 63 Page 59 of 66