Items tagged with integer integer Tagged Items Feed

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: restart: NCcoef := proc(N::integer) # procedure returns the Newton-Cotes coefficients for an # appoximation with N+1 points local a,c,p,h,B,LH,RH,eq,seqeq,seqco: h := B/N:

The first question: Is it possible in a procedure to combine datatypes ie

zz:=proc( X:: Matrix(datatype = [integer[2], float[8], float[8] ] ))

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 ?

My goal: given G(z,w), find the polynomial, P(n), in the partial derivatives of G(z,w) over the integer such that 

d^n z/ dw^n = P(n) / Gz^(2n-1)    where Gz= partial derivative of G with respect to z.

Step 1. Differentiate G(z(w),w) w.r.t w n times. Formulae are known for doing that (Mishkov, Tsoy-Wo Ma),

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  
Error, (in test) invalid input: too many and/or wrong type of arguments passed to test; first unused argument is 1 = 1

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.

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

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.



This is my program below. When I try to get an output, nothing happens, please help!



> restart:



> with(plots):











I am trying to plot four different DEs on one graph, but Maple does not like the fact that I have several constants that are not assigned to numerical values.  Here is my code:


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?


I'm trying to approximate an integer by using Simpson's rule but I can't find anything on how to input the coding so that it uses a specificed number of intervals, the default is 10 and I need it to be 5 can anyone tell me how to put that in??

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?



I've run into a problem with Maple. When I solve a trigonometric equation, for instance sin(x)=0, it responds with only one solution, even though there are countless. So what I mean is, when I type: solve(sin(x)=0,x) -> x=0 x = 0 is of course correct, but I would really like it to give the general form of the solution for such an equation. My TI CAS calculator responds with this general solution set: x=c*3*pi , where c is a random integer, Z, (any whole number). Is there any way to make Maple give such a respond as well?

Hi all.

Ok, I'm trying to save to a file a set of a complex number, a float number and an integer. According to Maple Help this can be done with:

writedata[append]('terminal',[-0.123456-0.123456*I, 0.1334423423*10^(-15),3], float, proc(f,x) fprintf(f,`%a`,x) end proc);

And it works (the numbers are just an example of what I'm trying to do).

The problem is that I want to change the precision of the second number (or to all of them) to say 5 digits. But when I try as the help suggests:

I need to formally partial-differentiate a given arbitrary function G(z,w) with respect to two other variables z=z(s,t) w=w(s,t) and then to express the p-th-total-order partial derivatives of z with respect to s and t as a polynomial in the partial derivatives of G with respect to z and w and the partial derivatives of w with respect to s and t, divided by the partial derivative of G with respect to z raised to the power 2p+1.   The eliminate function allows me to eliminate all partial derivatives of z w.r.t. s and t of total order lower than p.

4 5 6 7 8 9 10 Last Page 6 of 23