The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: GUI: Change plot in axes depending on the combination of two buttons
Replies: 2   Last Post: Nov 26, 2012 1:57 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 3
Registered: 11/26/12
GUI: Change plot in axes depending on the combination of two buttons
Posted: Nov 26, 2012 6:18 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


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.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.