Maple Questions and Posts

These are Posts and Questions associated with the product, Maple
I'm having trouble performing what I had supposed was a simple calculation. I'm trying to calculate pairs of values that lie on the binodal (liquid-gas coexistence) curve of the van der Waals phase diagram. I have an equation, that I need to solve for the two variables vg, and vl, based on two constraints. Unfortunately, while the code I have written returns answers, they are wrong, and do not even satisfy the constraints. My code is below - I'd be exceptionally greatful if someone could point out what I am doing wrong, or suggest a better way. > kbd := 1: > bd := 0.5: > ad:=2:
How do I programmatically save the output of "C" code generation to a "cpp" file? I am doing all of these in Matlab via the Maple engine, which is version 10, I guess. I cannot seem to do "writeto" redirection here, because Matlab doesn't allow that I guess. And I like to use "fprintf" because it gives me more control of the code that is generated... If it works, I no longer need copy and paste.. But it didn't work at all. There was no error message, but the file was empty... Can anybody tell me why? Thanks! -------------------- fd:=fopen("trygenC.cpp", WRITE, TEXT)
Hi, It appears that maple has some sort of internal memory restriction, which sometimes causes it to stop during a computation with the following error message: Maple was unable to allocate enough memory to complete this computation, see ?alloc ..." Browsing through ?alloc, it appears that there's a way to increase this "software limit" , using something they call a "-T cl argument" but I was not able to find just how to go about it. Any idea how this could be done? thanks
bb:=proc(aa, n) add(add(aa[j][k], j=0 .. 5), k=0 .. n) end proc cc:=prep2trans(bb) dd:=C(cc, optimized) ??? Error using ==> maple at 129 Error, (in codegen/C) Unable to translate this subscript into C aa[i2][i1] -------------- I don't understand...
Hello everybody. I'm a newbies here. I would be glad if anyone of you here could please help me to create a maple code to perform a full pivoting where it permits both row and column exchange.The code is to be used to any kinds of nxn square matrix..Thank you..:)
Here is the article. I wrote this as a blog entry, and felt it was better to leave it one place rather than duplicating it. Besides, I don't know how to delete a blog entry. A cheap way to earn five points; however, my next page addition—in the works—to this book will be recompense.
looking for the fastest complex number arithmetics... Hi all, I am looking for the fastest complex number arithmetics. There is one part of my program which needs complex number arithmetics. The final result is a real number. So I had two choices: (1) Using the C++ class, and do all the operations in complex domain, and finally extract out the real part of the result. (2) Calculate the real part of result in closed-form by hand, and program everything in C/C++ in real domain. I used to do (2). And I used Maple to help me obtain the real part of the complex-valued expressions in closed form and generate the C code. The speed is about 10x faster than (1).
f := piecewise( is(floor(x)::odd), 1, 0 ): seq( f(n), n=-5..5 ); plot( f, -5..5 ); produces (Maple 11) the expected output (sequence alternates 1 and 0 - plot is a square wave). Replace the definition of f by f := piecewise( floor(x)::odd, 1, 0 ): and the seq command still operates as expected but the plot shows f=1 between 1 and 2 but otherwise 0. Does anybody know what is going on here? It's probably not important but I am confused. Toby
Occasionally it is necessary to temporarily assign a global flag to perform an action. Consider, for illustration, a procedure that returns the inert form of a procedure. We want it to be able to work with procedures that are local to modules. To do that, we need to temporarily assign the kernel flag opaquemodules to false.
GetInert1 := proc(p::uneval)
local opacity,inert;
    opacity := kernelopts('opaquemodules'=false);
    inert := ToInert(eval(p));
    kernelopts('opaquemodules'=opacity);
    inert;
end proc:
Here is a small module to test this on:
Hi folks! Does anybody know if Matlab and Maple and Mathematica works well and stable on Vista? How about speed on Vista? Thanks!
I have been attempting to use Maple 8 to compute the limit of a function defined by a procedure (rather than as a piecewise function). For example, consider the following procedure. f := proc(x) if is(x,numeric) then if x > 1 then 1; elif x <> returns undefined. limit( f(x),x=1,right) --> returns undefined. When I use a piecewise definition, all is well: f := x->piecewise( x>1, 1, x
Sorry, but I don't understand why Maple produces two different answers. (I make many analysis calculations, some expressions [math functions] come directly, e.g. 5x-3, some by Maple e.g. by series command.)
s:=x-1/2*x^2+1/3*x^3+O(x^4);

                               1  2   1  3    / 4\
                           x - - x  + - x  + O\x /
                               2      3           
t:=series(ln(1+x),x,4);

                               1  2   1  3    / 4\
                           x - - x  + - x  + O\x /
                               2      3           
nops(s);
My laptop is broken and I am seriously considering purchasing a new laptop. I mainly use the laptop to do all kinds of programming, including Matlab, C/C++, Fortran, Maple, Mathematica, etc. I am wondering if anybody can tell some experiences about speed performance of Maple on Core Duo Dual Core processors? Are the computations on these computers really faster? I recall a few months ago I had tested a Monte Carlo program in Matlab on my friend's new Intel Quad Core (4 cpus). He paid $6000 for a desktop like that. The speed was not improved at all.
This one? int(log(c*exp(k*s)-d), s= 0 .. t) assuming (t>0, c>0, k>0, d>0) Thanks!
I'm trying to get the simple form of sum{k=1 to n} _2k C _k... I've tried to use Pascal's triangle, the gamma function, etc... but I couldn't get it... Somebody help~ My guess is _2k C _k is equal to binomial(2k,k). I used Maple... and the answer is ... as I see, a complex number!
F:=binomial(2*k,k);
                              binomial(2 k, k)
DefiniteSummation(F,k=1..n);

         (1/2)                                                               
    4 I 3                                            /[       3]            \
- -------------- - binomial(2 n + 2, n + 1) hypergeom|[1, n + -], [n + 2], 4|
First 1984 1985 1986 1987 1988 1989 1990 Last Page 1986 of 2097