Global Variables and Functions

7 次查看(过去 30 天)
Maria Raheb
Maria Raheb 2021-2-18
编辑: Adam Danz 2021-2-19
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

回答(1 个)

Adam Danz
Adam Danz 2021-2-18
编辑:Adam Danz 2021-2-19
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 😎.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by