Filter löschen
Filter löschen

How to declare global variable

2 Ansichten (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 Language Fundamentals 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