selectremove positive real part of complex number...

hi, suppose

integers:=[`\$`(-10..10)]; selectremove(`<`,integers,0);

so this separates +ve and -ve. But, if the range of values are complex, how do we separate them based on the +ve and -ve of the real part of the complex number? i.e I want to separate all a +- bi from all -a +- bi.

thanks

Extracting information from a procedure?...

Hi all,

I am after some advice on how to extract a value from a proc.

allow only integer values...

f := (k-1)^(p-1)/k; p := 1.99; maximize(f, k = 2 .. infinity, location); this is the problem... and it's working fine... but.. how do i make k take on only integer values?

Create random rational numbers between 0 and 2?...

I have only found rand() which gives me integer values and I need to generate (a lot of)  random rational numbers.

The boundary (0,2) doesn't really matter but I do need the numbers to at least go up to 2. Else any rational will do.

Thankyou.

ISO Faster method of generating specific permutati...

Situation:  I have multiple lists of the form [i\$i=1..n,0\$k] , where n is a positive integer and k is a nonegative integer.

Desired result:  For each list, produce a list of permutations of the list (as you would receive from combinat[permute]) such that in each permutation, the nonnegative integers in the list appear in ascending order from left to right and no two nonnegative integers are adjacent to one another.

solve is misbehaving...

Here is a simple sequcnce of commands that execute without a problem:
restart;
eq1 := 5+3*x=0:
eq2 := 2+7*x-3*y-5*x*y=0:
x:=solve(eq1,x):
y:=solve(eq2,y):
lprint('x'=x,'y'=y);

x = -5/3, y = 29/16

If I put the commands into a procedure there are problems:

Plotting random points along a curve...

I'm plotting some random points along a curve but I'm not sure of a couple of things so I have a few questions.

Using a simple curve like x for example.  First I'll choose some random numbers, 100, between -8 and 8, but I also want a couple of decimal points otherwise random integer values will only give me a maximum of 17 points.  So is the best way to do that like this?

with(plots):
a:=[seq((rand(-800..800)(i))/100,i=1..100]    # These will be my x point values;

Sorting with a Permutation List

by: Maple

A MaplePrimes member recently asked me how to sort two sets, using the permutation of one to sort the other.  For example, given the list

```L1 := [3+I, I, 2, -1, 5, 4]:
```

sort it according to its magnitude and then permute the second list

```L2 := [a, b, c, d, e, f]:
```

in the same manner.

LerchPhi & polylog...

Greetings all restart; f := x->x^4: assume(n::integer): an := 1/Pi*int(f(x)*cos(n*x),x=-Pi..Pi): FaN1 := sum(an*cos(n*x),n=1..N); FaN2 := Sum(an*cos(n*x),n=1..N); On Maple 13, FaN1 and FaN2 are very different representations of this series. However, on Maple 11 they are the same (same as FN2 on Maple 13). How can I persuade Maple 13 to convert FaN2 to FaN1 ? Also, how can I persuade Maple 11 to convert aFN1 to FaN2 ?

problem with keyword parameters and recursivity ...

```test := proc(x::integer, {y::posint:=1}, {z::posint:=1}, \$)
printf("%a\n", 'procname'(args));
if x > 100 then
procname(x-y-z-1, 'y'=10);     # not working (nor ''y'', uneval(y), evaln(y) etc.)
elif x < 100 then
procname(x-1, args[2..nargs]); # working
else
NULL;
fi;
end:
test(1000);
Error, (in test) invalid input: too many and/or wrong type of arguments passed to test; first unused argument is 1 = 1
```

modulo, not only for integers...

Is there a method to work with Reals or Complex modulo Integers (need not
to be modulo a discrete group, circle or torus is fine for me)?

Where the residue class is represented in the unit interval or square (as
the command modp does in the finite case)?

What I have in mind is to modify 'argument' to 'argument modulo 2*Pi', but
mod is for integer cases.

A hierarchy of Maple's numerical types

by:

I've created a Maple help page, saved in a small hdb file, that describes the hierarchy of Maple's numerical types.  Insert it into the path assigned to ?libname.  Access the help page with ?numer-hier. To make it compact, I took some liberties with the notation.  Here is what it looks like

f(n) = sin((a+b*floor(n))*pi/M).

In the blog MRB Constant-D I noticed a peculiar outcome to several sets of equations involving f(n) = sin((a+b*floor(n))*Pi/M), where M is a constant to be explored, b is a number to be found and a is a "starting value" that causes f(n) ~=  -1, 0 or 1.

Pass string array to external Fortran function...

Hello,

I would like to pass a string array to an external FORTRAN function, can this be done without generating wrapper code...I don't have a FORTRAN compiler...

The Fortran datatype is

character*255 hf(20)

In FORTRAN I would pass say "hf(1)='nitrogen.fld'", but I'm not sure what datatype to use in the maple define_external function or how to pass the data in?

checking if LP is unbounded...

Hi there,

I want to solve several LPs of the kind

L:=Optimization[LPSolve](obj, cnsts, maximize = true, assume = integer);

where it often is unbounded. Maple then prints a warning and returns a (meaningless) solution.

Now: how do I check, whether it is unbounded?

 3 4 5 6 7 8 9 Last Page 5 of 21
﻿