AmirHosein Sadeghimanesh

225 Reputation

7 Badges

8 years, 221 days

Social Networks and Content at

Finished Ph.D. in Applied Algebraic Geometry in Biology and did postdoc in Mathematics of Chemical Reaction Networks, University of Copenhagen. Another postdoc in Nonlinear Dynamics in the Mathematical Models of Cell Biology at University of Szeged. Currently a research fellow at Coventry University. Main interests; Applied and Computational Algebraic Geometry, Computer Algebra, Mathematical Biology, Chemical Reaction Network Theory, Population Dynamics. I'm also a language lover!

MaplePrimes Activity

These are questions asked by AmirHosein Sadeghimanesh

For a 2D parametric plot with only one parameter, in Maple we use plot([x,y,range]) but what about the case x and y are expressed by more than one parameter? How should I assign the range? For example I tried the following one

h := k[1]*k[3]+k[1]*k[4]+k[2]*k[4]:
x := k[2]/h:
y := (k[3]+k[4])/h:
A := seq(k[i] = 1 .. 2, i = 1 .. 4):
plot([x, y, A]);

But then I encountered the following error:
Error, (in plot) incorrect first argument [k[2]/(k[1]*k[3]+k[1]*k[4]+k[2]*k[4]), (k[3]+k[4])/(k[1]*k[3]+k[1]*k[4]+k[2]*k[4]), k[1] = 0.1e-2 .. 1000, k[2] = 0.1e-2 .. 1000, k[3] = 0.1e-2 .. 1000, k[4] = 0.1e-2 .. 1000]

For one parameter the above method doesn't make an error like the following:

x := t+1:
y := t^2:
A := t = 1 .. 2:
plot([x, y, A]);

So for more than one parameter, there should be another way to ask the plot. Does anyone know how to do that?

Assume you have a matrix A and somewhere you want to make a copy of it like B and working with them independently. Let's say you have a loop and after doing a proc on B again you have to make it equal to A. So changes on B shouldn't effect on A. What is the common way of taking such copies of A in Maple?

The following methods don't work.


What I came up with is the following but it will look weird if one really needs to write something meaningless like *2/2.

B := (1/2)*subs(B = 2*A, B);


For remainder of division of a (multivariable) polynomial to several polynomials at a same time one can use NormalForm in Maple. It is easy to write a procedure to also show the division but I wonder if there is any determined command such as NormalForm for this aim?

Previous year I was using Maple 2015 and I had a procedure in which I had used

A := Array((1 .. 3)$3);

And similar use of $. This year I'm using Maple 2016. Now I came back to my old procedure but Maple doesn't compile the procedure anymore and instead shows

Error, `$` unexpected
What is the problem? Is something changed in new version of Maple?

Why I use Array and $ is my old question here which was fine before.

I want to use while in proc but Maple shows an error saying


"Error, (in exa) illegal use of a formal parameter"


When I click on it, as usual it says "There is no help page available for this error". I tried a very simple example of while which you can see it below and it again shows same error. The while works well but when I put it inside of a procedure it makes an error. Note: the following example is just an example, this is not what I'm doing so please don't reply this while proc is not giving anything. My question is how can I use a while in procedure without encountering the above error.


i := 10;
while i > 1 do
if i mod 2 = 0 then i := i/2; else i := i+1; end if;
end do;


Now with proc


exa := proc (i::integer)::integer;
while 1 < i do
if i mod 2 = 0 then i :=i/2; else i := i+1; end if
end do; 
end proc;


"Error, (in exa) illegal use of a formal parameter"

First 7 8 9 10 11 Page 9 of 11