May 04 2010
i try to solve a function for zero (numerically) that contains the cdf of the binomial distribution, but i can't get i work. Maple (13) simply returns the equation without any solution.... Or strikes because of the non-algebraic content...
Let p(x,t) describe a probability for a binary event. Let Bcdf(z-2,n,p(x,t)) denote the binomial cdf such that the probability that this event happens at least z out of n times, where z and n are integers.
I want to compute:
I did the following:
CRRA := t->((t)^(1-rho))/(1-rho);
X1 := RandomVariable(Geometric(q));
assume(t::integer, 0 < rho, rho <> 1, 0 < q, q < 1);
As result I get a formula, where Maple defines _t0 (as far as I can see in italic font).
But why does Maple do so, and what does this mean?
Thx for answering.
I want to evaluate a polynomial and turn its coefficients into hfloats. Shouldn't evalhf do this? For example:
f := randpoly([x,y,z]); # integer coefficients
g := evalf(f); # software float coefficients
h := evalhf(f); # error
I think the last one should give me a polynomial with hardware floating point coefficients. Instead I get an error.
I have a multivariable function, F(n, g(1,0),g(0,1),g(0,2),g(1,1),g(2,1),...,g(n,1),g(n-1,2),...,g(1,n)), of indeterminates g(i,j) (omitting g(0,0) - in other words - let L = set of all pairs of nonnegative integers, (i,j), which satsify 1<= i+j <=n) of the following form F = product over all the (i,j) in L of g(i,j)^h(i,j) / ((i!
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.
I am after some advice on how to extract a value from a proc.
February 18 2010
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?
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.
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.
Here is a simple sequcnce of commands that execute without a problem:
eq1 := 5+3*x=0:
eq2 := 2+7*x-3*y-5*x*y=0:
x = -5/3, y = 29/16
If I put the commands into a procedure there are problems:
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?
a:=[seq((rand(-800..800)(i))/100,i=1..100] # These will be my x point values;
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.
f := x->x^4:
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 ?
So it appears that using subscripts in Maple is not a good idea.
I ran into this problem for the first time yesterday, and is documented here:
And now it seems I've run into it again. Or possibly I have made a mistake ;)
This is part of an implementation of Newton-Cotes method of numerical integration:
NCcoef := proc(N::integer)
# procedure returns the Newton-Cotes coefficients for an
# appoximation with N+1 points
h := B/N:
The first question: Is it possible in a procedure to combine datatypes ie
zz:=proc( X:: Matrix(datatype = [integer, float, float ] ))
The second question : If we assume that q is a floating number is convert( q, rational) the
best way to convert a float to a integer ?