MATLAB: Difference between revisions
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
Matlab is installed at <code>/usr/local/MATLAB/<version></code>. | Matlab is installed at <code>/usr/local/MATLAB/<version></code>. | ||
E.g. <code>/usr/local/MATLAB/R2020b/bin</code>. | E.g. <code>/usr/local/MATLAB/R2020b/bin</code>. | ||
You can also install it to your account in <code>~/.local/</code>. | |||
By default, matlab will not create a launcher icon. | By default, matlab will not create a launcher icon. |
Latest revision as of 21:11, 17 January 2023
Matlab is a commercial numerical computing language which costs $149.
Students are usually forced to use it in introductory math classes.
Unless required to use Matlab, I recommend using Python, Julia, or R which are all free and, in my opinion, more flexable.
For optimal CPU performance, you can also use C++ with Eigen.
Installation
Linux
Matlab is installed at /usr/local/MATLAB/<version>
.
E.g. /usr/local/MATLAB/R2020b/bin
.
You can also install it to your account in ~/.local/
.
By default, matlab will not create a launcher icon.
On Ubuntu, you can add a launcher icon by installing matlab-support
.
Usage
Anonymous Functions
sqr = @(x) x.^2;
Timing Code
Reference
tic
starts a timer. toc
returns the time elapsed in seconds since the started timer.
timerVal = tic
% The program section to time.
elapsedTime = toc(timerVal)