Why does the RUN button not work for my script?
287 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 21 de Mzo. de 2017
Respondida: MathWorks Support Team
el 6 de Abr. de 2017
I have a script that runs fine when I hit "Ctrl+Enter", but does not do anything when I hit the 'Run' button. The 'Run' button is green, and presses down like normal, but the script does not execute.
Running the code line-by-line works fine, and I can even copy/paste it into a new file. Why doesn't 'Run' work?
Respuesta aceptada
MathWorks Support Team
el 6 de Abr. de 2017
This may occur in some cases if you create a variable with the same name as your file.
Once the variable is created and exists in your workspace, it becomes a matter of shadowing. When you press the 'Run' button, MATLAB essentially pastes the name of your script into the command window. This means that if you have a variable of the same name, MATLAB will only print out the value of this variable but will not execute the script.
To work around this issue, you can simply rename your file or your variable.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!