Global Variables and Functions

7 vues (au cours des 30 derniers jours)
Maria Raheb
Maria Raheb le 18 Fév 2021
Modifié(e) : Adam Danz le 19 Fév 2021
I have defined a function (right hand panel) that uses parameters B,C, and p. Is there a way I can call this function in a different .m file (left hand panel) without having to redefine B,C, and p in plotting_bifurcation.m?
PLEASE CHECK .JPG FILE ATTACHED

Réponses (1)

Adam Danz
Adam Danz le 18 Fév 2021
Modifié(e) : Adam Danz le 19 Fév 2021
Assign B,C,p as outputs to bifurcation_host_pops().
Do not use global variables.
And in the future, please copy-paste code as text instead of images so we can more easily access it and use it in our answers 😎.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by