How can i get a GUI tick-box to create an output in workspace?

1 view (last 30 days)
I am designing a GUI where 4 tick-boxes decide which channels to calculate - so in theory i want to be able to run the calculation with anywhere between 0-4 channels loaded - i have everything worked out apart from getting the tick boxes to interact with the calculation. In the calculation there are 4 if valueA == 1 where i need to have an input of either 1 or 0 from the tick-boxes, i have tried evalin, and all the other sugestions on this site (so far spent 7 hours on this alone) so would one of you kind people do an idiots guide to this - i don't care if it's not the most elegant or fastest way of doing it (the calculation takes 1-2hours so 5 seconds is nothing!)
so to sumarize for those that didn't read that - i want a piece of code (explained if you're kind ) which when you click on a tick-box changes a value of either something in handles or workspace so i can use it in another separate program.
thanks in advance, Oliver
oh - please dont just link another page - i've spent hours going thourgh them all already :(

Accepted Answer

Image Analyst
Image Analyst on 6 Sep 2012
Try MAGIC. It's a nice framework that has all the typical widgets on it.
Basically to get the checkboxes' values you just do
checkBoxValue1 = get(handles.checkbox1, 'Value');
checkBoxValue2 = get(handles.checkbox2, 'Value');
checkBoxValue3 = get(handles.checkbox3, 'Value');
checkBoxValue4 = get(handles.checkbox4, 'Value');
  1 Comment
Oliver
Oliver on 6 Sep 2012
you are amazing - thanks - not sure about MAGIC but the other bits worked!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Sign in to comment.

More Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!