MATLAB: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
For optimal CPU performance, you can also use C++ with [[Eigen]]. | For optimal CPU performance, you can also use C++ with [[Eigen]]. | ||
==Installation== | |||
===Linux=== | |||
Matlab is installed at <code>/usr/local/MATLAB/<version></code>. | |||
E.g. <code>/usr/local/MATLAB/R2020b/bin</code>. | |||
By default, matlab will not create a launcher icon. | |||
On Ubuntu, you can add a launcher icon by installing <code>matlab-support</code>. | |||
==Usage== | ==Usage== |
Revision as of 19:49, 17 October 2020
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
.
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)