82 lines
2.6 KiB
Markdown
82 lines
2.6 KiB
Markdown
+++
|
|
title = "Matlab"
|
|
author = ["Thomas Dehaeze"]
|
|
draft = false
|
|
+++
|
|
|
|
Tags
|
|
:
|
|
|
|
|
|
## Resources on Matlab {#resources-on-matlab}
|
|
|
|
Books:
|
|
|
|
- ([Higham 2017](#org80aac16))
|
|
- ([Attaway 2018](#org689a4e6))
|
|
- ([OverFlow 2018](#org6480d2d))
|
|
- ([Johnson 2010](#org657d51a))
|
|
- ([Hahn and Valentine 2016](#org23bf05a))
|
|
|
|
|
|
## Useful Commands {#useful-commands}
|
|
|
|
| Command | Description |
|
|
|------------------------|-------------------------------------------------------------|
|
|
| `desktop` | Open the Matlab Desktop |
|
|
| `workspace` | Open the Workspace |
|
|
| `who` | List all variables in the workspace |
|
|
| `edit <filename>` | Edit the file using Matlab Desktop (usefully for debugging) |
|
|
| `help <function>` | |
|
|
| `doc <function>` | |
|
|
| `checkcode <filename>` | Check Matlab code files for possible problems |
|
|
| `preferences` | Open Matlab preferences |
|
|
|
|
|
|
## Tips {#tips}
|
|
|
|
- Folder that starts with a `+` are automatically added to the path.
|
|
It is useful to add function inside such folder.
|
|
Then the function is accessible with `folder.function`.
|
|
|
|
|
|
## Snippets {#snippets}
|
|
|
|
|
|
### Do not show legend for one plot {#do-not-show-legend-for-one-plot}
|
|
|
|
```matlab
|
|
figure;
|
|
hold on;
|
|
plot(x, y1, 'DisplayName, 'lengendname');
|
|
plot(x, y2, 'HandleVisibility', 'off');
|
|
hold off;
|
|
legend('Location', 'northeast');
|
|
```
|
|
|
|
|
|
## Installation {#installation}
|
|
|
|
If a single user is using the Matlab installation on the machine:
|
|
|
|
```bash
|
|
sudo chown -R $LOGNAME: /usr/local/MATLAB/R2017b
|
|
```
|
|
|
|
Then, Toolboxes can be installed by the user without any problem.
|
|
|
|
To install Toolboxes, the best is to Download the Matlab installer from mathworks and just select the wanted toolboxes.
|
|
|
|
|
|
## Bibliography {#bibliography}
|
|
|
|
<a id="org689a4e6"></a>Attaway, Stormy. 2018. _MATLAB : a Practical Introduction to Programming and Problem Solving_. Amsterdam: Butterworth-Heinemann.
|
|
|
|
<a id="org23bf05a"></a>Hahn, Brian, and Daniel T Valentine. 2016. _Essential MATLAB for Engineers and Scientists_. Academic Press.
|
|
|
|
<a id="org80aac16"></a>Higham, Desmond. 2017. _MATLAB Guide_. Philadelphia: Society for Industrial and Applied Mathematics.
|
|
|
|
<a id="org657d51a"></a>Johnson, Richard K. 2010. _The Elements of MATLAB Style_. Cambridge University Press.
|
|
|
|
<a id="org6480d2d"></a>OverFlow, Stack. 2018. _MATLAB Notes for Professionals_. GoalKicker.com.
|