Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1494
Number of posts: 2174

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Matlab Help Posted by andiemac on 5 Dec 2012 at 11:19 AM
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;

end

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');



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.