I'm creating a GUI to visualize OFDM signal processing. My problem is weird.
I have nine togglebuttons (let's name buttonX, where X is the number of each button))to change the block of OFDM scheme (for example Symbol Mapping or IFFT). Next to those, there is additional four togglebuttons to change the plot (time domain, frequency domain, constellation or BER noise figure). ---------- In Callbacks of every togglebutton i wrote:
plots(handles); % it's a function to change plot depending on the combination of togglebuttons (for example when 'Value' of (button1 == 1 && buttonP1 == 1), then plot ofdm spectrum ; when (button1 == 1 && buttonP2 == 1), then plot time domain ofdm signal, and so on).
visibility(handles); % it's a function to change 'Enable' of the togglebuttons (for example I don't need constellation scatterplot in the IFFT block).
guidata(hObject, handles); ---------
It works fine, when There is only one condition (Button1 == 1), for example Button3 shows stem of bits. But when I want to see the spectrum of OFDM signal(in Button1 I have Enabled two additional ButtonP1 and ButtonP2 for plot frequency and time domain signal) - click Button1 and then ButtonP1.. it's not working. I have to set ButtonP1 "1", then click different buttonX and finally click Button1 again. Now I have my plot. What is wrong? How can I refresh Button1 (because I'm guessing that function plots(handles) just cant get value of the Button1 after I clicked ButtonP1.
I hope It's understandable. Please help me.
I apologize for my English. If there is something not clear, I will try to explain my problem different way.