Skip to content

Instantly share code, notes, and snippets.

@blakeNaccarato
Last active January 22, 2024 19:09
Show Gist options
  • Save blakeNaccarato/d34d4c00a031803a1ef9f21a94e07a4e to your computer and use it in GitHub Desktop.
Save blakeNaccarato/d34d4c00a031803a1ef9f21a94e07a4e to your computer and use it in GitHub Desktop.
Notes on actually calling Python from within Matlab, Matlab from within VSCode Jupyter notebooks, and version control of Matlab project folders with Git.

Matlab and Python notes

Notes on actually calling Python from within Matlab, Matlab from within VSCode Jupyter notebooks, and version control of Matlab project folders with Git. These are hastily scribbled notes, not transformed into anything cohesive quite yet.

Do this all the time at scale, with many people in a team. Git is amazing, hands down, for distributed work flow.

Simulink's diff tool is... adequate. Mathworks, if you're listening, older versions were better when it color coded the differences.

You absolutely have to componentize. Library blocks everywhere, one block per library if you can (new subsystem references may be the same thing). It should be virtually impossible to find a subsystem that isn't a reference. Then merge often.

If you have small deltas, the built-in diff and merge tool works well. However, you also need lots of files to avoid the conflict in the first place.

This flow chart should be your new Bible:

https://www.mathworks.com/help/simulink/ug/types-of-model-components.html

Note that "subsystem" isn't an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment