MATLAB: How to turn on and turn off parts of the script

comment out codecommentsreadabilityscripts

(I am sure there are already answers to my question, but I am having trouble thinking of the keywords that would lead me to them.)
I have written a long script for a project that has multiple parts. In order to demonstrate each part, I have to comment out some other parts and uncomment the part that I need.
The project is too complicated for me to consider putting everything in functions only. Is there a way for me to easily turn on and off parts of my script?
Edit: My code is divided into sections and I can comment and uncomment out blocks of it, but I was told that the code needed to have "flags" so that I can easily turn on and off different blocks of the code with just a click or a single input. A function or an if statement might work but I think that would be very messy.

Best Answer

I don't have much experience with this new(ish) functionality, but it sounds like you might be describing things that can be done with a Live Script.