MATLAB memo
A friend asked me for help on MATLAB, but I had never used it before. And I have to learn it from the scratch and try to solve the problems. Fortunately, I also have a colleage familiar with MATLAB, who can afford some help.
The first thing to do is registering on MATAB’s website to get a trial version, R2019b. If you are an University student or an employee of an University, yo may get an academic license from the company.
The next step is to install it on Windows 10, which is simple and quick.
As a beginner, here are some hints I learnt.
-
Command window
Just like similiar tools, for example, the acient Microsoft Foxpro, we can input the commands and get the result interactively. It is useful to do some trial and error experiments when writing code.
-
Curremt directory
Make sure current directory is on `work’, or else the opening of the *.fig file may report errors, complaining some of the controls can’t be found.
> cd work
We can always change the current directory when needed.
-
*.fig
It is the UI design file generated by the GUIDE tool. The message poped up saying it is deprecated, and can be converted to the new tool App. I tried the migration tool and found the UI is a mess, so falled back to the deprecated GUIDE tool to open and design the UI.
The UI of the GUIDE tool doesn’t look so well, I just treat it as a simpler Microsoft VB.
-
*.m
The source code corresponding to *.fig, or standalone source code. As for beginners, it should be a good practice to try the commands in the Command window first, then write it down in a *.m file.
-
Debugger
Looks like VB. That is handy. We can set breakpoints, step into, step out, continue, continuee etc. The values of the variables can show up on the focus of the mouse, or in a debug window, Finnaly, it is also useful to print the variables in the Command window.
-
Help
> doc reshape
If the help system is not installed, we can visit the official website. The document system and tutorials are very good.
-
Screen recording
Windows 10 have a tool to record the screen, which is helpful to communicate with my friend.
matlab
]