Run Section button greyed out
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Steven Sagona
il 28 Ago 2018
Modificato: madhan ravi
il 28 Ago 2018
Hello, I would like to run sections of my code that are delimited (by %%). The GUI apparently seems to section off my code using the %% notation, but it does not give me the option to run the sections - as seen in this picture:

I have seen other threads that have discussed the inability to run individual sections of code, but I have not had any success implementing anything that I've found. Any ideas on what I can do to troubleshoot this?
Risposta accettata
madhan ravi
il 28 Ago 2018
Modificato: madhan ravi
il 28 Ago 2018
The root of the problem was auxiliary functions defined within the main script. Since these functions were located in one of the sections, you can't call them from other sections separately. The solution was to save auxiliary functions as separate m-files.
4 Commenti
madhan ravi
il 28 Ago 2018
Modificato: madhan ravi
il 28 Ago 2018
so the better thing would be to run the whole script first and then you can run each sections separately like live editors because each one is interconnected with one another.
madhan ravi
il 28 Ago 2018
Modificato: madhan ravi
il 28 Ago 2018
if you find it useful please do accept the answer.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Entering Commands in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!