AmirHosein Sadeghimanesh

225 Reputation

7 Badges

8 years, 186 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

Is there any predefined command in Maple that you can run it on a Maple code file such as an mpl file, or just on a piece of code written in the worksheet file and it edits the code by the easy usual styling preferences such as what pylint does in Python? Adding spaces arround ":=" or adding indentation etc.

Consider an easy example of a table.


We can give an index to it and get its corresponding entry if exists.


We can also get the set of all indices, or the set of all entries. But what about receiving the index or set of indices with a specific entry. for example asking what indices have the entry `1`?

Of course I can define a search procedure myself, but I thought there might be an efficient way which is already implemented as a function/method on tables.

Consider the following simple example. It works fine and we get a plot with two blue points and two red points when we run it inside Maple. However, when we right click on it and choose export as `.eps` file, the result is a plot with four black points!

List := [[[0, 0], 1], [[1, 2], 0], [[2, 3], 0], [[3, 1], 1]]:
plots[pointplot]([seq(List[i][1], i = 1 .. nops(List))], color = [seq(`if`(List[j][2] = 1, red, blue), j = 1 .. nops(List))], symbolsize = 12, symbol = solidcircle, labels = [typeset(t), typeset(x[t])]);

Of course one solution is to make a seperate pointplot for each color and then use `plots[display]`. But what if there is a situation with more number of colors or a gradient of colors which you can't know how many colors will be in the end?

Is there any specific reason behind becoming black when I export the output of this plot? I wonder why it is displayed properly inside Maple, but not in the eps output.

I was trying to use the idea explained in this post (), using `densityplot` to create a barplot. But there are several difficultes specially using new Maple that has problem with exporting plots in pdf format the same as displayed inside Maple.

The example code:

zmin := 0;
zmax := 1;
verthuebar := plots:-densityplot(z, dummy = 0 .. 1, z = zmin .. zmax, grid = [2, 10], style = patchnogrid, size = [90, 260], colorscheme = [ColorTools[Color]([0, 0, 1]), ColorTools[Color]([1, 0, 0])], style = surface, axes = frame, labels = [``, ``], axis[1] = [tickmarks = []], axis[2] = [tickmarks = [aList[1] = "0   ", 0.5 = typeset(alpha*` `), 1 = "1    "]]);


1- When I export the bar-plot as `.eps`, it shows white lines as a grid, while I don't want it and it is not the same way it is displayed at Maple! 


I tried adding `gridlines=false` and other similar things, but had no effect. I changed `10` to `3` in `grid = [2, 10]`, but it increases the distance of 0 and 1 from the borderies and therefore wrong numbers will be read from the color bar. Exporting the picture as `.pdf` doesn't have that gridlines problem, but destroys the proportions of the image, so I want to stick on the `.eps` one, but without those white lines.

2- How can I have 0 and 1 exactly on the start and end of the color bar and with no distance from the edges? I can use `view=[0..1,0..1]` at the end of the above code, but depending on the number in the `grid=[2,n]` that I choose, the colors may not start and end exactly at the specified colors.

Recently, I encountered warnings and errors when size of my list is big. Maple says use array instead of list because of ... . When the list is just a list of numbers or a list of lists of the same size, I can rewrite it as an array, but how about a list like the following?


This is just an example. So the elements of this list are lists containing a vector (a point in the plane) and a number (a property of this point). One idea is to use two arrays, a two dimensional array for recording the vectors, and one 1-dimensional array for recording the numbers and keep in mind that the i-th number of the second array is related to the i-th vector (row) in the first array. But is there any possibility to have this data recorded similar to when we are using lists, i.e. similar to the above code?

1 2 3 4 5 6 7 Last Page 3 of 11