Borrar filtros
Borrar filtros

Are there any way to execute same program multiple times?

11 visualizaciones (últimos 30 días)
Yasuyuki Hamanaka
Yasuyuki Hamanaka el 14 de Jun. de 2021
Respondida: John D'Errico el 14 de Jun. de 2021
I made a code called save.m. I want to execute the program many times without pushing Run button. And I want to change the code a little bit. Are there any function to execute and change a matlab code?

Respuestas (1)

John D'Errico
John D'Errico el 14 de Jun. de 2021
Um, you use a loop. This is a tool that allows you to execute the same code as many times as you wish.
But if you are changing the code each time, then no. You do NOT want to somehow programmatically change your code, saving the new function, then running it.
HOWEVER, good code would allow you to pass in whatever information you need, effectively changing the code on the fly, because your code will have been written to recognize the various parameters passed into it, and to know what to do with them.
How to do exactly what you want is impossible to know, since we cannot read your mind to know what you need to do. Essentially, you just need to learn sufficient skills in MATLAB to accomplish your goals.

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by