Pre-populate boxes in a prompt window?
Show older comments
I have only just in the last month or so learnt how to use MATLAB. I'm currently trying to make a basic GUI for a series of race car dynamics calculations.
I'm using questdlg and inside one case, a prompt. User assigns numbers for variables, and the calculations are completed and results displayed in a msgbox. When button is pressed, user is asked if they want to see results on a line graph, then asked if they want to see some other results on a bar chart.
Finally user is asked if they want to change any values. If yes is selected, code steps back to the start of the while loop where the prompt box is created and opened.
I want the boxes in this prompt to contain the numbers they original input, so changing just one and seeing the change in results is easy.
Can I do this? If so, how? I have avoided GUIDE as I want a very short simple script (240 lines inc. comments currently)
Accepted Answer
More Answers (1)
Image Analyst
on 25 Nov 2015
0 votes
Don't be afraid of GUIDE. It's not that hard and can make some things easier. Perhaps you'd like to get started with this easy-to-use generic framework. http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component
Description This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to select a folder of images, select one or more images and display them, to select a series of options, and to individually or batch process one or more images. The user can
4 Comments
Matt
on 25 Nov 2015
Star Strider
on 26 Nov 2015
If your objective is to impress a potential employer, PULL OUT ALL THE STOPS! Go for the GUIDE option, both because you’ll learn useful skills and will show your potential employer you’re willing to learn and attempt new things. Make your code original (all yours), clean, efficient, reasonably robust, and fun for the employer to use when the employer uses it. It could be used by several people, all of whom may have a say in whether to hire you and determine your compensation, and some of whom may have significant experience with MATLAB. And be confident and professional, not obsequious, in your programming and all other interactions with your potential employer.
I’m certain others will have additional ideas, probably amending mine in some respects.
GOOD LUCK!
Image Analyst
on 26 Nov 2015
You haven't shown much - probably not the full code. But what little I see, as an employer, is simple, primitive code. I see someone who just wanted to do something quick and dirty to get an answer but really wasn't interested in writing professional code worthy of selling to the general public or my customers. Could you write a professional program - something with the GUI sophistication of Word, Excel, Powerpoint, or Photoshop? Who know - maybe you can and maybe you can't. I would not be able to determine that from the snippet you gave. I certainly would not be impressed at that code, at least not enough to hire you based on your ability to write robust professional looking software - there's just nothing there to demonstrate that. Graphic designers, artists, and fashion designers have portfolios of their work - illustrations of what they've designed. Do you have that? I'd maybe be impressed if you showed me 20 screenshots of GUIs of different programs that you designed. Or if you could tell me that you have 6,000 users of your application, or that you have 8 applications for sale to the general public - something like that.
When I hired an image processing Ph.D. we looked at dozens of resumes, telephone interviewed about a dozen, and brought in 3 or 4, and ultimately hired one. They all said they knew MATLAB. One even said that he taught MATLAB. So I asked them all a simple question. I said I had a white substrate with dark stain on it and different images had different amounts of stain cleared away, so their area fractions were different. I told them I wanted to know the area fraction of white and dark, and I had good control over the lighting. I asked them how they would do it in MATLAB. This is about as basic as you can get. You'd be surprised how many or them could not solve the problem. Some of them didn't even know about regionprops() - which is THE number one main function of the entire Image Processing Toolbox. Most of them came up with wrong algorithms - nonsense like graythresh(), etc. And these were Ph.D.s who were supposed to be MATLAB experts. Only one got the right answer and that was with me throwing a few hints his way.
Categories
Find more on Data Type Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!