## local vectors and matrices within a procedure for ...

Hi,

I am trying to ease my c coding work with the "CodeGeneration" tool in maple. The Idea to generate ready to use functions is quite thrilling.
In my attempts to generate code I entontert two problems.
First it seems to be impossible to assign local vectors to vectors passed in the argument list:

> MapX := proc (X\_out::Vector(2), X\_in::Vector(2), PRO2RO::Vector(2))
> local X\_t :: Vector(2,0), i;
> X\_t[1] := PRO2RO[1];
> X\_t[2] := PRO2RO[2]*10;
> X\_out := X\_in + X\_t;
> return;
> end proc;

here the assignment X\_out := X\_in + X\_t; is not recognized.

## Nested lists whose number of nestings depend on a ...

Hello everyone, I am trying to create a procedure to translate a matrix into a nested list. (in Maple 10) I actually want to transform the matrix A[i,j] whose indexes are in the interval i,j=1,2,... d^k in a list: L[n1,n2,...,n2k] whose indexes are in the intarval n1,n2,...n2k = 0,1,2...,d. For instance, a transformation of indexes could be: for i from 0 to d do for j from 0 to d do for k from 0 to d do for l from 0 to d do L[i, j, k, l] := DM*([1+(sum(d^(i-1)*n[i], i = 1 .. k)), 1+(sum(d^(i-1-k)*n[i], i = k .. 2*k))]) od: od: od: od: But I would actually like to indtroduce k and d as parameters of the procedure. My problem is then how to say:

## 3D trapezoidal interpolation, or another suggestio...

Hi All, I'm wondering if anyone can advise me on ways to perform 3D trapezoidal interpolation in Maple. Using 40 experimental data points View 2213_090606_PleaseHelp.mw on MapleNET or Download 2213_090606_PleaseHelp.mw, my goal is to generate a figure like the one on the right here: That figure was generated manually by a colleague of mine (he drew in the triangles himself), but I'm wondering if Maple can do something like this. Thank you very much for your time!

## Infinite Integral...

Hi; Is there any way to find int(x*exp(-I*x*theta)/sinh(1/2*Pi*x),x=-infinity..infinity); by maple, where theta is a real constant. cheers Sayed

## Is it possible to do Div operation on a tensor_typ...

I know using partial_diff can do Grad of a rank 1 tensor (i.e. vector) and get a rank 2 tensor. How do I do the reverse? is there any simple way? Thanks

## ... use codegen without redundency in the code out...

We use maple to generate all of our computational bits, dump this out to header files, and include this in our code base. A lot of the code that is generated is redundant so it would be nice to have codegen[C] know, or at least be able to be told, to optimize the entire code being dumped to the same header file. Is this possible? Examples follow... " ..... DCb := array(1..3): lp:='lp':ip:='ip':m:='m':ap:='ap':jp:='jp':a:='a':l:='l':j:='j':i:='i':k:='k':kp:='kp': for ip from 1 to 3 do DCb[ip] := sum(sum(sum(sum(sum(gd[ip,jp]*gu[ap,lp]*jacu[m,lp]*jacu[a,ap]*dJ[jp,m,a],m=1..3),jp=1..3),lp=1..3),ap=1..3),a=1..3):

Our's is a large I.T training organisation we are looking for I.T Professionals who can create worksheets through Maple 10.Familiarity with the mathematics module will be an added advantage.
The requirement is quite urgent if anyone interested or knows anyone who is interested please contact ASAP.

## First Order Logic...

I have a problem with a sentence that I have. I don't know whether it is a formatting problem or problem with the statement itself. I'm trying to say something like this (if it makes it less abstract, I'm trying to formally define a Sudoku puzzle). For any set S and function F that maps the ordinal set |S|^2 to |S|, there exists a set T which is a subset of S^|S||S||S| such that any element of T Tabc is equal to the empty set iff c !=F(a,b) First of all, theres a couple issues with this. |S| is the cardinal of S, but for convenience I also use it as an ordinal set. Second, as I started typing this I saw that I do not have the necessary statement for all Tabc which are members of T. How can I correctly input this statement into Maple?

## Program using Statistics, Sample...

Hello,

--------------------------------------------------------------------------------------

with(Statistics); with(LinearAlgebra);

#k is a Vector everywhere in this program
ModeFreq := (k, m)->Norm(<Norm(k, 2), m>, 2);
OscillatorAmplitude :=(n, k, m, x) -> (ModeFreq(k, m)/Pi)^(1/4)*exp(-1/2*x^2*ModeFreq(k, m))*HermiteH(n, x*sqrt(ModeFreq(k, m)))/sqrt(2^n*factorial(n));
DeltaApproxAmplitude :=(x0, N, k, m, x) -> evalf(expand((sum(OscillatorAmplitude(n, k, m, x)*OscillatorAmplitude(n, k, m, x0), n = 1 .. N))/sqrt(sum(OscillatorAmplitude(n, k, m, x0)^2, n = 1 .. N))));

## Working with Maplet Builder...

I am trying to familiarize myself with the functionality of the Maplet Builder, and I'm having some frustrating problems. Whenever I set a button to change the value of a MathML viewer, for the command, I use the statement MathML[Export](insert Maple statement here), and I receive an argument error. In addition, I was wondering if (while using the builder) there was a way to add some code that evaluates one or more Maple statements (i.e., variable definitions to be used by multiple Maplet components,etc.) that does not affect the value of any of the component properties. I'm used to using the GUI components in worksheet mode which seem to be more flexible in terms of programming actions for components (perhaps only because of my ignorance pertaining to the Maplet builder).

## Having a bit of trouble integrating this one...

Hi guys, I am trying to integrate the following expression: u_ratio:=(4/omega_star)*(sin(omega*t)-(exp(-B)/sqrt(r_star))*sin(omega*t-B)); where omega_star:=omega*r0^2/nu; r_star:=r/r0; B:=(1-r_star)*(sqrt(omega_star/2)); I would like to obtain integral of u_ratio with respect to r_star, and separately the integral of u_ratio over one period. When i try to use something like int(u_ratio,r_star) in only get back a large expression with an integral symbol still in it. What would be the best way to approach integrating this guy? Thanks, Randy

## How to coding such kind of function (Convolution)?...

Hi all: I want to realize the following function in maple: 1> According to the input vector, n, canculate the n times of auto-convolutions, after getting the final result, measuring the vector according to each element of the result. If I use the math language, Suppose I have vector, called A the length of vector is L; Result = A*A*....A (n times convolution); Measure= Sum (on i) (Result[i]*ln(Result[i]); I donot know how to coding like that Thanks for any help. How to read the parameters from keyboard in maple? Thanks bin

## Maplets -...

Hello, I've got the following problem: I want to build a Maplet with the Maplet Builder. This Maplet shall contain a plot, a slider and a textfield. After moving the slider, the plot shall change and at the same time the textfield shall show the value of the slider. Is it possible to assign two conjunctions to the slider at the 'onchange' field? Thanks for helping, Frauke