GUI design - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

GUI design

JMassJMass Posts: 1Member
[size=2]Develop a GUI that presents a series of questions, and collects responses from a user.

What is your favorite color? Have participants enter their favorite into a text box.

What is your second favorite color? Have participants enter their favorite into a text box.

What do you think the correlation is between year in college and GPA? Have participants
enter their response using a slider (with text labels).

Do you prefer axis labels on gures or not? Have participants enter their response with radio

Ask the questions in random order, and collect the responses. In a final segment, present a scatter plot with the year of the student on the x axis, the GPA on the y axis, and the men and women
plotted in the favorite colors. Print the true correlation as the title, as well as the difference between the true correlation and the correlation guessed by the user. Allow the user to delete points, and recompute the correlations after the deletions. Add a done button that closes the window.[/size]


I have the GUI's designed for the first half, but in terms of the final segment I have having trouble with a few things. Namely, getting the input from the user, saved and able to be loaded by the program itself for the scatter plot.
As for deleting points, I have the idea to use MMZAP but I am not sure how to incorporate it.
I dont know how to make the questions appear in a random order without opening 4 separate figures in a random order each time you call the function.
[code]object = randperm(4);

for i = 1:4
if object(i)==1
%insert uicontrol functions here
elseif object(i) ==2

elseif object(i) ==3

elseif object(i) ==4


The done button is completed with the following code

[code]h = uicontrol('style', 'pushbutton', 'string', 'Done', ...
'position', [10 100 50 50], 'callback', @closeWindow);[/code]
Sign In or Register to comment.