How to declare global variable

1 Ansicht (letzte 30 Tage)
Muhammad Tarique
Muhammad Tarique am 23 Apr. 2016
Beantwortet: Azzi Abdelmalek am 23 Apr. 2016
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
function y=fcn1(~)
global your_variable
do it in all your functions

Weitere Antworten (0)

Kategorien

Mehr zu Argument Definitions finden Sie in Help 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