Symbolic integration in Octave? (Need to Install extantion? How? - Using Ubuntu 12.04) - octave

I would like to calculate the following symbolic expression in GNU Octave:
int(exp(ikx-|k|^n),k,-infinity,infinity) , (- it would a function of 'x' of-course, where 'x' is an array of data.)
I don't succeed.
I understood, searching a bit in the internet, that Octave does not come initially with a built-in 'Symbolic math' suite.
Is this true?
How do I download and install it (using Ubuntu 12.04, from the 'Terminal'?)?
Thanking u on advance!

Yes. GNU octave is the core program and language. What you are looking for are functions from the symbolic package that belong to Octave-Forge. They are two different but related projects. Let me remind you that the symbolic maths toolbox is also not part of Matlab core, it's a different product.
To install them in Ubuntu, it depends on how you installed Octave:
from the Ubuntu repositories? If so, sudo apt-get install octave-symbolic.
compiled it Octave yourself? Start Octave and at the Octave prompt pkg install -forge symbolic
from one of the up to date PPAs? Check if they also have the sybolic package and install that one
I can tell you in advance that the symbolic package has been unmaintained for a long time, and doesn't work very well with latest Octave versions (it was written for a very old version of Octave). The advice usually is to switch to Maxima which is designed exactly for that. Since 2015 the symbolic package is again actively maintained. However, Octave is still a programming language aimed at numerical computing. If all your problems require symbolic computations, then consider using a computer algebra system. Maxima is often recommended.

Related

AllenNLP Server: pip is looking at multiple versions of each package

Within my Conda environment with Python 3.6.9, I've installed AllenNLP 9.2.0. I tried to install AllenNLP Server following the instruction from https://github.com/allenai/allennlp-server by running pip install --editable .
However, the installation procedure never finished as the compatibility checks with several modules, e.g. pip is looking at multiple versions of tqdm to determine which version is compatible with other requirements. This could take a while. Collecting tqdm>=4.19
Does anybody know what happens here? Should I add more restrictions to steup.py in AllenNLP server? However, there is any code included in such file.
Thanks a lot for your help.
I just tried it with AllenNLP 2.0.1 (the latest), and while it takes a long time, it does eventually resolve the packages.
That said, I would recommend two things:
Use Python 3.8 instead.
If it still doesn't work, specify a version of tqdm tightly in the requirements. My version automatically picked tqdm==4.56.2, just or reference.

How to install FEATool on Octave (Ubuntu 18.04)?

I want to install FEATool on Octave 4.2.2. Therefore, I went through these steps:
Downloading it.
Trying pkg install FEATool-Multiphysic.tar.gz in Octave command-line interface.
Octave returns this error:
COPYING file missing.
Neither GitHub nor FEATool provides any installation file for Octave or instructions about doing it.
Therefore, the question is:
How to install FEATool on Octave (Ubuntu 18.04)?
Following a quick preliminary check, it seems that the FEATool is no longer available or compatible with Octave since FEATool v1.10.
While there was no explicit announcement for this either on their blog or changelogs, according to the main author of the software (as elicited below), this seems to relate to overhead involved in supporting Octave on top of Matlab. Furthermore, as the company seems to have effectively chosen (for their own good reasons, I'm sure) to intentionally follow a direction that explicitly breaks Octave functionality, it cannot be expected to work on this platform even as unsupported software. Therefore the answer to your question is that "no you can no longer install this tool on octave (ubuntu or otherwise)".
Evidence that this software is no longer available for, or compatible with Octave:
Mentions to Octave in the documentation from v1.8 have now disappeared and are exclusive to Matlab (with extra effort towards Matlab backwards compatibily)
The .tar.gz package is no longer an Octave-compatible package.
The main code relies on .p files, which obfuscate the code and are unsupported in Octave
Past releases and source code have disappeared and are no longer available for download, both from sourceforge, official website, and github. Therefore it is not possible to download the octave-compatible v1.8 of the tool either.

Best solution to have multiple CUDA/cuDNN versions installed on Ubuntu

I am using Conda on Ubuntu 16.04. My objective is to associate each Conda environment to a specific version of CUDA / cuDNN. I had a look around and I found this interesting article, which basically suggests to put different CUDA versions into different folders and then use an environment-specific bash script (run when the environment is activated) to properly set the PATH/LD_LIBRARY_PATH variables (which creates the association with the CUDA version).
This is fine, but when I try to install frameworks such as pytorch using Conda, it forces me to install also the "cudatoolkit" package.
So, a couple of questions:
1) does downloading cudatoolkit mess up my previous CUDA configurations? which version will be used?
2) if using Conda is possible to install "cudatoolkit" and also "cudnn", why not just using conda for everything? Why even needing to apply the instructions of the above mentioned article?
Thank you.
As an answer to the first question, no, downloading and installing another CUDA toolkit won't mess up other configurations. From CUDA toolkit installer, you specify an installation directory, so just pick whatever works for you that is unique to that CUDA version. This won't affect any currently installed CUDA versions. A Pytorch install will look for a CUDA_HOME environment variable as well as in '/usr/local/cuda' (the default CUDA toolkit install dir.), so it's just this environment variable that needs to be changed.
I can't speak for the second part. Perhaps the installation using Conda will use the default installation directory for the CUDA toolkit (seems silly but this is just speculation).

How to create binary Debian package (s) for several architectures?

I'm trying to create packages for some robot controller code that will support different architectures, such as i386 and armhf (for Raspberry Pi). I don't know how Debian intends this to be done. Is there a way to create a single .deb package that contains both binaries? Or must I create a separate .deb package for each architecture, which I do know how to do?
In the latter case, if I give the two packages the same package name, I can't put them both in the same repository, but if they have different names, users will have to specify which package they want to install using apt-get. Is there a solution to this problem?
You need to have different binary packages for different architectures unless what you're packaging is interpreted and not compiled.
If the package you're making is compatible with all architectures, then the Architecture: field of your debian/control file must be any. This is telling you that the package can be built in any Debian supported architecture. Then you'll just compile it and cross-compile it to i386 and armhf.
About your second question, you can. In fact, this is how is done in the official Debian repositories. The binary packages have a suffix in the file name containing the architecture. See this example. When users install your package, they won't need to specify the architecture as it's automatically detected.

Is there an implementation of ZMQ in Octave

After googling a bit, I did not find anything that stroke as really useful.
I was wondering if there was any ZMQ interface implemented for Octave, I know there is something in Matlab, but I have not tried it yet.
I just put together a port of the matlab version which works great in octave (under ubuntu). So far it's working great for what I need:
https://github.com/esromneb/zeromq-octave
The library has a few limitations (for instance publish always connects out and subscribe always binds to a port) but if you can live with that it's great!
There is a zeromq package available from octave forge which works in octave under linux and windows.
You should be able to install it in octave by running:
pkg install -forge zeromq
(assuming you also have the zeromq library installed)
It supports most of the socket types, including pub/sub, req/rep, push/pull.
Details of the package can be found here: http://octave.sourceforge.net/zeromq/