problem Install Manopt matlab toolbox in windows 10 - matlab

I try to install Manopt matlab toolbox in windows 10. I try the website, it says.
Unzip and copy the whole manopt directory you just downloaded in a location of your choice, say, in /my/directory/.
Go to /my/directory/manopt/ at the Matlab prompt and execute importmanopt.
You may save this path for your next Matlab sessions (via savepath).
However, where I try their example:
manifold = spherefactory(100);
it says:
Undefined function or variable 'spherefactory'.
Is it possible to just add manopt in the path? I try
addpath('manopt');
which work for some other toolbox but it doesn't work for manopt. Is there any way to install it on window 10? Thanks

Related

How to run system commands in Octave for OPM flow reservoir simulator?

I do research in oil simulation, I normally use a simulator called Eclipse from a company called Schlumberger and I was able to use it from my scripts from Matlab using the following command.
% file name 'ICFM.DATA';
system(['eclrun',' eclipse ', C:Path\ICFM.DATA]); % Command to run ECLIPSE
Now I had installed a new Free simulator (OPM.org) in linux and I am using Octave for programming. but I am unable to find out how to run simulator from Octave.
The simulator can be run simply by writing
flow ICFM.DATA
and the results using a command
ecl_summary ICFM.DATA
I want to be able to run and get the results from with in Octave but I have not being able as in Matlab.
Any suggestions? someone?
Assuming both the flow and ecl_summary commands are on your system path (i.e. the "linux" path, not in octave), then it should simply be a matter of:
system('flow /my/path/to/ICFM.DATA');
system('ecl_summary /my/path/to/ICFM.DATA');
(where you should change /my/path/to with whatever path your data file is in).
I found that I am able to run the simulation using the syntaxes
unix('flow ICFM.DATA')
This is in Matlab R2017b for Ubuntu 16.04
Initially I got an error as the output was reporting:
....'GLIBCXX_3.4.21' not found
All the problem was due to a Matlab issue that was solved using the answer on
https://askubuntu.com/questions/719028/version-glibcxx-3-4-21-not-found
which was to type:
LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab
on the terminal.

Unlink MAPLE symbolic from Matlab

When I installed MAPLE I synchronized it with my MATLAB account. My MAPLE license has expired and I am unable to do regular symbolic math in MATLAB. I just tried to define a symbolic character in MATLAB and I got this error:
syms k
??? Error using ==> sym.sym at 198
Error using ==> maplemex
Feature has expired.
Feature: Maple17
Expire date: 09-jan-2015
... and so on. Can someone please help me unlink MAPLE.
If you are using Windows, uninstalling Maple will also remove the Maple toolbox for Matlab. You can also uninstall just the Maple toolbox for Matlab from the Programs and Features menu in the Control Panel.
For Linux, to remove just the toolbox, there is an uninstall script in the root of the Matlab install directory in a folder called Uninstall_MapleToolbox.
One of the possible ways is:
...\toolbox\symbolic\symbolic\#mupad
and from this directory, run the m-file called mupad.m,
and your symbolic math toolbox works fine.
This resolves the problem for once and you would need to run this file everytime when you need the toolbox- mupad.

MATLAB 2014a (8.3) Compiler Runtime Errors libmwlaunchermain.so

MATLAB 2014a (8.3) Runtime Compiler (MCR) Errors when trying to launch deployed (using
deploy tool) application in Ubuntu 13.04.
Right after installation of MCR if one runs the deployed application following error appears:
error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory.
Since I have already found a solution to this problem wasting a day, I just want to share it:
This seems to be a problem of MATLAB MCR installation script designed for Linux by MathWorks. Furthermore, it is a result of a known Ubuntu bug. To fix it, add your MCR to the $PATH as shown below:
First make sure to add the missing files to the right folder, in terminal:
sudo cp /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/glnxa64/* /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64
Add the proper library folder to your .profile, such that this change will stay after logout
ubuntu: gedit .profile
In the end of the file add following lines:
#MATLAB MCR
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64
export XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/X11/app-defaults
export PATH=$PATH:$LD_LIBRARY_PATH
export PATH=$PATH:$XAPPLRESDIR
Invoke following code in the terminal to make sure that Ubuntu bug doesn't re-write your variable:
echo STARTUP=\"/usr/bin/env LD_LIBRARY_PATH=\${LD_LIBRARY_PATH} \${STARTUP}\" | sudo tee /etc/X11/Xsession.d/90preserve_ld_library_path
Reboot
If this solution doesn't work, try to reinstall MATLAB MCR 8.3 from the MathWorks website and repeat the steps.
In my case (Matlab R2016b = v91), the binary generated by Matlab was accompanied by a shell script which sets up the LD_LIBRARY_PATH for me. If I just run
./run_scriptname.sh
it complains about the missing <deployedMCRroot>. So running the script with
./run_scriptname.sh /home/user/MatlabMCR/v91
it worked out of the box.
For me, it was not obvious that the path shown above is the <deployedMCRroot> because I chose /home/user/MatlabMCR as installation directory. And with the wrong path specified, it led to the same error message.

Is there a way to install a toolbox from Matlab's command windows?

I am using matlab on a high performance computer (HPC). But they don't have a toolbox I need. I need to install it . Is it possible that I install a toolbox via matlab script locally?
Yes, look at Matlab's addpath, genpath and savepath functions.
Either use addpath(genpath(...)) in the command line followed by savepath to permanently (and globally) add it to the path. Or else you could have addpath(genpath(...)) at the start of your main script to just make sure you always have that toolbox loaded for relevant sessions without permanently adding a toolbox that other users might nit need to the path.
Oh wait, are you asking if you can install a toolbox you don't have at all like from a package repository? In that case I don't think so.

Runtime error for MCC compiled program using parfor

I have problems running a program compiled with MCC that uses parfor. The non-compiled .m version works (no bug). When I run the compiled version, I get
"distcomp.remoteparfor" is undefined. I believe I exactly have the error described in
the following link.
http://www.mathworks.com/support/solutions/en/data/1-PAHWE/index.html?product=CO&solution=1-PAHWE
However, since MCR is not installed on my machine (got Matlab and MCC),
I am wondering what the pathes $APPNAME_mcr/java/jar/toolbox and
$MCR/MATLAB Component Runtime/v70/java/jar/toolbox correspond to. I found
the distcomp.jar file in C:\Program Files\MATLAB\R2011b\java\jar\toolbox, but I don't know where to put it since see any path corresponding to $MCR/MATLAB Component Runtime/v70/java/jar/toolbox since MCR is not installed.
Thanks a lot!
Fred
No need to install the MCR if you are simply trying to run the application on the same machine that has MATLAB. The question to ask is, HOW are you launching the compiled application? From a DOS command window? From within MATLAB using the SYSTEM command?
If you are launching the application from a DOS / UNIX command line, then the important thing to keep in mind is that the MATLAB binaries need to be on your system path i.e. just make sure:
$MATLABROOT\bin\$ARCH
is on your system path. Where $MATLABROOT is the matlab installation folder, and $ARCH is your system architecture. For example:
c:\work\matlab\bin\win64
on my machine since my installation folder which contains MATLAB is:
c:\work
and i am on a win64 machine.
The problem is solved. The solution is to make the program
a function instead of a script :
http://www.mathworks.com/matlabcentral/answers/22825-parfor-errors-when-file-is-compiled