Exchange data between 2 popupmenu on GUI
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
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 个评论
Walter Roberson
2019-9-14
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
2019-9-14
Jhon Rackham
2019-9-14
Walter Roberson
2019-9-14
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
2019-9-14
Rik
2019-9-14
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
2019-9-14
Mostly start coding. Use GUIDE to get started. I have described all of the steps and shown the syntax to use.
回答(0 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!