I have multiple m-files and i want to use same global variable for all files so how should i declare and on which place

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 23 Apr. 2016

0 Stimmen

function y=fcn1(~)
global your_variable
do it in all your functions

Weitere Antworten (0)

Kategorien

Mehr zu Filename Construction finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by