Exchange data between 2 popupmenu on GUI
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
Hi everyone.
Guys, i'am new on MATHLAB i don't know anything about variables, propieties, etc.
But i have a project:
I'm working on this GUI:

The program should do the next conversions:
In first place, i have to insert a numer in the edit1, then i have to choose what type of value is it (Decimal, Binary,Hexadecimal,Octal)
After that, i have to choose what value i want to convert (Decimal, Binary,Hexadecimal,Octal) and that value should be set on the edit 2.
Please guys, help me with my project, i don't know anything about MATHLAB, i was watching videos on youtube but i can't understand.
I hope you guys help me, thanks.
7 commentaires
Walter Roberson
le 14 Sep 2019
In your previous questions such as https://www.mathworks.com/matlabcentral/answers/479628-how-to-make-a-program-that-conver-a-numer-to-binary-decimal-hexadecimal-and-octal We showed you how to get information from a gui handle
get(handlename, 'propertyname')
To change a gui property you use set instead of get
set(handlename, 'propertyname', value)
Jhon Rackham
le 14 Sep 2019
Jhon Rackham
le 14 Sep 2019
Walter Roberson
le 14 Sep 2019
idx = get(firsthandle, 'value') ;
set(secondhandle, 'value', idx) ;
Now you have seen how to store information in a variable. Now you have seen how to find out which entry of a popup or listbox selected. Now you have seen how to change which entry of a listbox is selected.
I already described the conversion algorithm to you step by step and told you what had to be fetched from where and which routines to use for doing the numeric conversion, and which routines to use to convert the numeric results to appropriate text to send to the editbox String property.
If you need more than look in the File Exchange for Matt Fig's 41 Complete GUI examples.
Jhon Rackham
le 14 Sep 2019
Rik
le 14 Sep 2019
If the aim of this project is to teach you Matlab it seems the pacing is a bit strange. You can also do the Onramp course to get started with the basics. Onramp is offered for free by Mathworks.
Walter Roberson
le 14 Sep 2019
Mostly start coding. Use GUIDE to get started. I have described all of the steps and shown the syntax to use.
Réponses (0)
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!