carry value of variable in other function

1 次查看(过去 30 天)
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

采纳的回答

Sean de Wolski
Sean de Wolski 2012-3-15

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Scope Variables and Generate Names 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by