Question about GUI programming - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Question about GUI programming

tsangaridoutsangaridou Posts: 1Member
Hello. I am trying to make a GUI about speech recognition. i want to hold a variable from one function and use it to another one. for example. i have this code.

% --- Executes on button press in ixografisi. (record Button)

function c = ixografisi_Callback(hObject, eventdata, handles)

a = wavread('tilefwno_mix.wav');



c = end_detection(a);

% --- Executes when selected object is changed in uipanel2.
function b = uipanel2_SelectionChangeFcn(hObject, eventdata, handles)

if (get(,'Value') == 1.0)
b = 1
b = 2

% --- Executes on button press in apotelesma. (result button)

function d = apotelesma_Callback(b, c, hObject, eventdata, handles)

if (b == 1)
g = 'm';
elseif (b == 2)
g = 'f';

d = demo(c,g);

I want to use the variable c from the record button and the variable b in uipanel2 in the result button. the variable b only takes 1 or 2 depends on the selection of male or female. but when i get it to the result button it has a value of 18.0032. why? can someone help me pls?

thank u
marina :)
Sign In or Register to comment.