How to Set up Matlab's userpath in Terminal?
<p>I want to set Matlab's <code>userpath</code> etc the following in Terminal, instead of doing it in GUI Matlab session.  </p>

<pre><code>userpath('/home/masi/Documents/bin/matlab/')
</code></pre>

<p>This thread is continua 2 of the thread <a href="https://stackoverflow.com/q/38188831/54964">How do I specify the MATLAB editor keybindings programmatically
</a> about <code>startup.m</code> where I can set some other things. 
I cannot find about it in Documentation so it must be in the undocumented part of Matlab because I know this feature can be done. </p>

<h2>My proposal after Suever's answer</h2>

<p>Run just once after the installation</p>

<pre><code>echo "export MATLAB_USE_USERWORK=1" &gt;&gt; $HOME/.bashrc

matlab -nodesktop -nosplash -r \ 
    "userpath('/home/masi/Documents/bin/matlab/'); exit;"
</code></pre>

<h2>Problem with <code>userpath</code> and <code>addpath</code></h2>

<p>See test codes <a href="https://stackoverflow.com/q/38283814/54964">here</a>. Some other configurations have to be applied too. </p>

<p>Matlab: 2016a<br>
System: Linux Ubuntu 16.04   </p>