Different ways to store notes
- Write them down on notebooks
- Save them in word documents
- Use online service such as Google Doc, Evernote, Onenote, etc.
So when you save more and more matlab plotting scripts you starat to lose track of them. You thought you have a script that can generate a plot but just can’t find it.
Now I have migrated my notebook from Wordpress to Github page. Markdown is brilliant! Here are some examples for future use.
1) Fork a branch to my own repo on Github
2) Clone a branch from my own repository with submodules
$ git --recursive -b branch/name/here https://username:email@example.com/hydrotian/ACME.git
3) Make changes to the code, add them,and commit
$ git add --all $ git commit –a -m "comments to this commit"
4) Push changes to my repo
$git push origin name/of/the/branch:name/of/the/branch
5) Send pull request on Github
I like interpreted languages such as Matlab or Python, mostly because I’m more like a software user, not developer. These languages usually come with an Integrated Development Environment (IDE) for easy code editing and debugging. However, for compiled languages such as Fortran, there isn’t many choices for IDEs but Eclipse has some potential to be a good alternative.
I always have needs to find numbers from a formatted string using Matlab. For example, find the lats and longs for all the grid cells of a river basin based on a bunch of input files, something like
forcings_35.25_-100.75. Then in Matlab you have two ways to read these numbers out.
This is kinda stupid and I’m sure there are much more elegant ways to do this. But for a quick and dirty job it’s good enough to me.
ArcGIS shapes such as points and polygon, or even raster files can be plotted in Matlab. Here is an example of reading and plotting HUC4 polygons in Matlab.