digital-brain/content/zettels/matlab.md

67 lines
3.3 KiB
Markdown
Raw Normal View History

2020-06-03 22:43:54 +02:00
+++
title = "Matlab"
author = ["Thomas Dehaeze"]
draft = false
+++
Tags
:
## Resources on Matlab {#resources-on-matlab}
Books:
- <sup id="88712982e0649b89da706b6abbcbc6c2"><a href="#higham17_matlab" title="Higham, MATLAB guide, Society for Industrial and Applied Mathematics (2017).">(Higham, 2017)</a></sup>
- <sup id="15f4380b6ce8a647387d3ccea25711f1"><a href="#attaway18_matlab" title="Attaway, MATLAB : a practical introduction to programming and problem solving, Butterworth-Heinemann (2018).">(Attaway, 2018)</a></sup>
- <sup id="e770e23b0d222a65eb74f036227b13b2"><a href="#overflow18_matlab_notes_profes" title="Stack OverFlow, MATLAB Notes for Professionals, GoalKicker.com (2018).">(Stack OverFlow, 2018)</a></sup>
- <sup id="87b279fa5b4ec9b1a73abed2d00b313f"><a href="#johnson10_matlab" title="Johnson, The elements of MATLAB style, Cambridge University Press (2010).">(Johnson, 2010)</a></sup>
- <sup id="1b4159c36c5367ee0c92139fb403e7e1"><a href="#hahn16_essen_matlab" title="Hahn \&amp; Valentine, Essential MATLAB for engineers and scientists, Academic Press (2016).">(Hahn \& Valentine, 2016)</a></sup>
## 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');
```
# Bibliography
<a id="higham17_matlab"></a>Higham, D., *Matlab guide* (2017), Philadelphia: Society for Industrial and Applied Mathematics. [](#88712982e0649b89da706b6abbcbc6c2)
<a id="attaway18_matlab"></a>Attaway, S., *Matlab : a practical introduction to programming and problem solving* (2018), Amsterdam: Butterworth-Heinemann. [](#15f4380b6ce8a647387d3ccea25711f1)
<a id="overflow18_matlab_notes_profes"></a>OverFlow, S., *Matlab notes for professionals* (2018), : GoalKicker.com. [](#e770e23b0d222a65eb74f036227b13b2)
<a id="johnson10_matlab"></a>Johnson, R. K., *The elements of matlab style* (2010), : Cambridge University Press. [](#87b279fa5b4ec9b1a73abed2d00b313f)
<a id="hahn16_essen_matlab"></a>Hahn, B., & Valentine, D. T., *Essential matlab for engineers and scientists* (2016), : Academic Press. [](#1b4159c36c5367ee0c92139fb403e7e1)