## 225 Reputation

8 years, 306 days

## Social Networks and Content at Maplesoft.com

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!

## The number of non-isomorphic simple conn...

@maplefan123 Look at this link A001349 - OEIS, it has the sequence of number of non-isomorphic connected simple graphs on n vertices. The sequence start from n=0. As you can see it quickly start growing. And if you label your vertices, then the numbers become even larger. Are you looking for a specific small n / small n's, or you really want an arbitrary n?

## currentdir()...

@acer `currentdir()` will do it.

## How to get the path that the mpl file is...

@acer One more question. Le't say one may put content of my folder in another path on his own computer, then he should manually change this line in the main mpl file or I can change my code such that it always search everything relative to the folder that this mpl file is located there. If they were keeping the parent folder's name the same, it would be fine, but consider that they are not keeping the parent folder's name the same. Now is there any command that can attain the path to the folder containing an mpl file? In that case I can put that at the beginning of the code.

@Zeineb Your attached worksheet file is working pretty fine. You put the following code.

```N := 3;
x:=sin(N);```

And the output is "3" and "sin(3)". Which means everything works well. Now N contains the value 3 and x contains sin(3). If you think sin(3) is something wrong, then you should remember that Maple is good with symbolic expressions and does not need to always save things in numerical values which some other software do. If you expected to see a numerical value of sin(3), then you can ask `evalf(x);` then Maple shows you the numerical value of x which is 0.1411200081. Or if you wanted to save the numerical value inside x from the beginning and you don't want Maple to remember that x is sin of 3 radian, then instead of `x:=sin(N);`, type `x:=evalf(sin(3));`.

Is this what made you confused?

## Not x, "value of the function for fixed ...

@oggsait Carl Love is asking about the value of the function being constant with respect to x. He didn't mean x is a constant number. So it means if you pick up a fixed value of t, let's say t=0.2, then the value of your function is the same for all x values 0<x<1. So if your function is called u(x,t), then is it true that u(0,0.2)=u(0.5,0.2)=u(1,0.2)? The figure you put at your question suggest such a thing.

## Thanks...

@acer Thanks. In fact I had tried the the same line, but instead of `=` I had typed `:=` ^_^

## It's perfect, but it's error message in ...

@vv Thanks. It works fine. Just one small complain is that when it is used for type declaration of the allowable arguments of a procedure, then in case of giving a wrong type input table to the procedure, the generated error message is not very informative for the user, specifically if the user is not familiar with programming and is just going to use your defined proc. Let's look at the following simple example.

```testProc:=proc(inputTable::satisfies(e -> e::'table', e -> [indices(e,nolist)]::list(integer),  e -> [entries(e,nolist)]::list(list(integer))))
return(inputTable):
end proc;
```

Now trying  `testProc(table([1=[12,14],2=[x]]))[2];` gives an error saying the input argument is not of a correct type, but its message is not in a very informative way.

`Error, invalid input: testProc expects its 1st argument, inputTable, to be of type satisfies(proc (e) options operator, arrow; e::'table' end proc, proc (e) options operator, arrow; [indices(e, nolist)]::(list(integer)) end proc, proc (e) options operator, arrow; [entries(e, nolist)]::(list(list(integer))) end proc), but received table( [( 1 ) = [12, 14], ( 2 ) = [x] ] )`

For example if it would say a simple message that the entries of the input table have to be of the type `integer`, it would be easier for the user to notice the problem of his inputs, specially if he is not familiar with programming.

But thanks for introducing `satisfies`. I may put some lines to produce better error message for the user whenever it is necessary.

## Angles in a equilateral triangles are 60...

@yangtheary I guess you have some mistyping in your question. An equilateral triangle has all its angles 60 degrees, then how can BAC be 20? (Equilateral triangle - Wikipedia)

## How to remove several entries of a table...

@Carl Love Then the question becomes how to remove more than one element from a table efficiently. For removing an entry of a table, there is a command `unassign` as explained at page 143 of the Maple programming guide 2020. Is there a command to unassign more than one entry at once or I should use a loop?

## None of maplemint and code edit regions ...

@dharr Thanks. But I'm already aware of `maplemint` command at Maple and also `code edit region`. But none of them are what I'm looking for because of the following reasons.

1- One can also write a maple code file (let's say an mpl file) at VSCode as well. Now the Maple's `code edit region` is not something inside VSCode (instead, one can use maple extension for vscode).

2- `code edit region` (and also the maple extension for vscode) has some feautures such as some colorings, but it does not edit what you type. One example that I also mentioned at my question is spaces around ":=". So I want to just type my code and not waste time pressing space key many times. I write "a:=5;", and I expect something automatically change it to "a := 5;". For python, there are such tools that can be used at editors such as VSCode or Atom etc. `code edit region` and also `maplemint` do not do any changes on my written code about spaces etc.

3- `maplemint` can be called on a procedure, and it doesn't work on something like `x:=5;`.

## possibility of using `cat(j,'__',i)` wit...

@Carl Love Thanks. Recently a colleague showed me that it is better to use `__i` instead of `[i]` for indexed variable names. I still like `x[i]`, but try to avoid it at my current project.

Anyway, about using my simple answer with the `__` indexing.

Replacing `j[i]` with `j__i` will not work, because eventhough we mean the varying index i, Maple count `i` as a symbol `i` at `j__i`. Now to make sure that Maple put the value of `i` and not the symbol `i` itself, we can use `cat(j,'__',i)` instead of `j__i` ^_^

```L:=[0,1,3,4,6,10,11,15]:
ans:=0:
for i in L do
ans:=ans+i*degree(f,cat(j,'__',i)):
end do:
ans;```

Now we get 41 for `f:=j__0^4*j__11*j__15^2` as expected.

## Even using `implicitplot` and `arctan` h...

You're right, even using `implicitplot` and `arctan` makes extra tails.

`plots:-implicitplot(arctan(y/x)=0,x=-1..1,y=-1..1,view=[-1..1,-1..1],color=blue);`

This should give the x-axis, while it gives the y-axis as well!

@mmcdara Thanks for your detailed explanation and the code ^_^

## Thanks...

@nm Thanks. Using tabular inside figure environment in TeX is a good idea.

## Quality and ratio concern...

@mmcdara Thanks for your suggestion. Yes, or for example one can export the whole "mw" file (the worksheet) as a pdf and then crop the region of interest from the pdf. However, using this method sometimes some parts of the tabulate-plot goes out of the initial whole-file-pdf pages or the ratios and scales change etc.

The screenshot is good as it doesn't change the ratios, scale etc. But then the quaility will not be the same as other plots, let's say you want to use your plot as a figure in a paper.

 1 2 3 4 Page 2 of 4
﻿