Howdy, Stranger!

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


Matlab Help

Stuck on a basic intro to matlab class assignment. If you have any tips, great! Just need a nudge in the right direction. Thanks!

I need to present three questions in a GUI, and I need these to present in a random order. I've included one of my questions (which works fine) but having trouble figuring out how to make them appear randomly (not even sure how to get the next question, which should be displayed separately, to popup automatically after the first question is answered). Hopefully this makes sense! And thanks to anyone who can offer some advice.

function Final ()

a = (1:3);

d = randint(1,1,3) + 1;

for i = 1:52

while a(1,d) ~= d

d = randint(1,1,3) + 1;


function FavoriteDog()

f = figure

handles.questionOne = uicontrol('style','text','position',[400 200 150 60], ... 'string', 'What is your favorite dog?', 'fontsize', 16);

uicontrol('style','popupmenu','string','Choose|Poodle|Pug|Lab') if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');
Sign In or Register to comment.