carry value of variable in other function

1 visualizzazione (ultimi 30 giorni)
i m creating a gui where pushbutton callback has the code to take a .wav input in z1.
Fs = 44100; % Sampling Freq (Hz)
Duration = 1; % Duration (sec)
z1 = wavrecord(Duration*Fs,Fs);
now i want z1 to contain the values in other function also.what should i do.plss help
thanks and regards

Risposta accettata

Sean de Wolski
Sean de Wolski il 15 Mar 2012

Più risposte (1)

777
777 il 15 Mar 2012
i found it, declare z1 as global in each function global z1 :)

Categorie

Scopri di più su Scope Variables and Generate Names in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by