Declaring a global variable

조회 수: 1 (최근 30일)
karthikeyan T
karthikeyan T 2012년 2월 10일
hello guys i need to declare and define a global variable X1 to 0 in a gui callback and i need to use this variable and its value 0 in another callback function.how do i do this.pls help

답변 (1개)

William
William 2012년 2월 10일
global X1 = 0 % use all caps for global
I would advise against using global variables as they can be difficult to debug sometimes. Just my 2 cents

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by