@JoshTheEngineer
  @JoshTheEngineer
JoshTheEngineer | Explained: How I Set Up MATLAB Scripts [MATLAB] @JoshTheEngineer | Uploaded March 2014 | Updated October 2024, 7 hours ago.
In this video I show how I personally set up a MATLAB script before I begin any coding. The title of the code can be more descriptive than the actual name of the file. I like to include who wrote the code. This isn't necessarily important if you're the only one accessing your code, but if you write code in a framework with other people, this helps indicate who actually started the file.

The started and updated dates are important, especially if you have multiple versions of the code (e.g. Code_v1.m and Code_v2.m) because it will help you keep track of changes. I have (dated) notebooks in which I derive the math behind some of my codes, so I can easily compare last update of the code with my notes from that day.

Commenting your code is extremely important! Don't neglect to comment just because you think you'll remember what you did. If you write enough code, you WILL forget why you wrote something the way you did, and comments help tremendously.

Code folding and selective execution (using ctrl+enter) can be very convenient when you want to run just a single section of code. I forgot to mention this in the video, but you can also select the code you want to run with your mouse, and then press f9. I'm a sucker for code folded sections though.
Explained: How I Set Up MATLAB Scripts [MATLAB]Explained: NACA 4-Digit GUI Part 3/10 [MATLAB]Uniform + Vortex Flow (Incompressible Potential Flow)Streamline Geometric Integral VPM [Nx(pj) and Ny(pj)]Source/Vortex Panel Method: AirfoilHow To Take Pictures Like NASA: DIY Background Oriented SchlierenExplained: Airfoil Cosine SpacingExplained: Combined 1st & 2nd Laws of ThermodynamicsHow To: Calculate a Cars Top SpeedExplained: Popup Menu GUI [MATLAB]Explained: Check Box GUI [MATLAB]How To: 3D Print a Rocket Nozzle

Explained: How I Set Up MATLAB Scripts [MATLAB] @JoshTheEngineer

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER