Effacer les filtres
Effacer les filtres

How to do running another .m file that calls this .m file?

2 vues (au cours des 30 derniers jours)
KD
KD le 9 Déc 2021
Commenté : Rik le 9 Déc 2021
x = [5 10 12 3];
y = [11 8 3 3];
plot(x,y, 'g')

Réponses (1)

Chunru
Chunru le 9 Déc 2021
Save the followint into a file, for example, 'my_script.m':
x = [5 10 12 3];
y = [11 8 3 3];
plot(x,y, 'g')
In a separate script, for example, 'another_script.m':
run('myscript.m') % to run your first script in second script

Catégories

En savoir plus sur Files and Folders 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