Effacer les filtres
Effacer les filtres

repeat many time same script

13 vues (au cours des 30 derniers jours)
Elisbeth Brandner
Elisbeth Brandner le 1 Déc 2019
I want to execute the following script 10 times. Is it possible to run this script first as function, and open this function in another m-file? Do you know another method how I can repeat this script 10 times?
The m-file is attachted.
Thanks for your support!
Elisabeth Brandner

Réponses (1)

KALYAN ACHARJYA
KALYAN ACHARJYA le 1 Déc 2019
Modifié(e) : KALYAN ACHARJYA le 1 Déc 2019
As per knowledge, your above stated direction is best.
  1. Save the code as new function file say fun1
  2. In the Main script use loop to run it multiple times
for i=1:10
result=fun1()
end
The output of the code can be save in array or cell array depending on output arguments of the function file

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by