> procA :=

proc ()

print ("Hello");

2;

end proc:

> procB :=

proc ()

local i;

i := procA();

end proc:

> procA ();

"Hello"

2

> procB();

"Hello"

2

The main that I want to get is:

if it was executed procA, it should show "Hello" text and the 2 number, but if it was executed procB, it should show only the 2 number, it shouldn`t show "Hello" text.

What can I do to get this special result in procB?

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.

Hi,
is it possible to define a variable for example "x" upon which it depends whether an execution group in a worksheet will be excecuted when clicking on !!! (Execute whole worksheet) or not?
Illustration of the idea:
x:=1;
if x=1
then execute execution group
else do nothing
end if;
I am thankful about any ideas!

I have an expression, lets say
x^2+ y*z^2+y^3 and I want to divide it with x*y and I want the output to be
x/y+z^2/x+y^2/z
How do I do this?

Can anyone tell me why "type" answers "false" and why do I get an error message, from the following simple code sequence (Maple 10)?

Thanks

restart;

> testp:=proc(m);

> if (m=0) then 0;

> elif (m>0) then 1;

> elif (m<0) then -1;

> end if;

> end proc;

> assume(n,posint);

> about(n);

> type(n,posint);

> is(n,posint);

> testp(n);

> testp(-1);

testp := proc(m)

if m = 0 then 0

elif 0 < m then 1

elif m < 0 then -1

end if

end proc

Originally n, renamed n~:

is assumed to be: AndProp(integer,RealRange(1,infinity))

false

Hello,
I'm a complete Newbie. The first thing I did was to take the "10 Minute Tour" which is accessed through the help file. One of the things this tour has you do is to create an animated plot, which I did. However, the doc says "Clicking on the plot enables the animation toolbar.". Well, I click on the plot and my cursor turns into a curvey arrow, which let's me twist the plot around, but I don't get any animation toolbar. Could someone tell me exactly where and how to click to bring up the animation toolbar. The doc also mention an "animation slider". How do I get that?
-Thank

#1 Typically, on plots, removable discontinuities are represented by a small cicle at the discontinuity. How can such an object (i.e. the circle) be generated, preferrably automatically, by Maple at these points.
#2 Also, if, for example, the signum function is plotted
(i.e. a step discontinuity at x=0). How is an open circle plotted at (0,-1)
and a closed circle plotted at (0,1)?
Thanks in advance.

Hello everyone,
I asked yesterday a question in the newbies section. I have found a partial answer which I detail further down but still have some questions and errors. I hope someone can give me a hand.
Thanks.
The question is more or less the following:
Given the parameter k.
One declares a nested list like the following:
```
L[n[1],n[2],...n[k],m[1],m[2],.... m[k] ],
```

where all 'n' and 'm' indexes run in the interval:
```
n[i] =0,1,.. ,d-1
m[i] =0,1,.. ,d-1
```

QUESTION: How can we translate this list into a square matrix of dimension d^k that has the indexes:

Hi
I need to find out the index of a dae, is there a maple command that does this for me?

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:

#1 Typically, on plots, removable discontinuities are represented by a small cicle at the discontinuity. How can such an object (i.e. the circle) be generated, preferrably automatically, by Maple at these points.
#2 Also, if, for example, the signum function is plotted
(i.e. a step discontinuity at x=0). How is an open circle plotted at (0,-1)
and a closed circle plotted at (0,1)?
Thanks in advance.

Hello,
In a Maple graded question (mode=Maple@) the type (formula, or maple synthax)
allows us to choose one of two possible ways of parsing student answers.
I would like to write questions where i can choose, or provide,
a parser to parse student answers into Maple expressions.
Given a Maple parsing procedure myParser(ans::string),
i can set
mode=Maple@
maple=evalb(myParser($RESPONSE));@
and then ask students to write their answers inside quotes,
so that their answers get parsed as strings.
Besides being ugly, i'm afraid this aproach will lead to
many wrong answers of students who forget to quote their input.

Hi.

I am trying to debug a small piece of code I've written.

I have a procedure for solving some quite complex equations. For single points in space.

I have a procedure that:

has some quantities passed to it,

brings in a 2 by 80

Does a for loop for each of the rows in the data, to take the first col value, and puts that along with the vars passed to it into the first procedure. It then works out the difference between the value given by the first procedure and the second col. Squares this and adds it to the total.

I'd like to use the NPLSolve minimize function to minimise this total squared sum of differences, by passing differnt values to the second function.

Hello, I have a problem with using JSP on MapleNet platform.

Suppose I have a HTML document with forms (the form calls itself for evaluation) and in that document an input text filed:

<input type="text" name="eq1">

At the beginning of the page I can assign a value in the text field to a maple variable:

<maple:assign param="eq1" variable="eqn1" default="sin(x)" />

but imagine that user fills the textfield with the text:

sum(n,n=1..4)

If I use something like this:

<maple:statement>print(eq1)</maple:statement>

There will be 10 on the output. How can I get an unevaluated input ( sum(n,n=1..4))?

solve(y(x)+3, x)
solve(y(x)+3, y)
solve(int((x+3)*y(t), t = 0 .. 2) = x^2+1, y)