In this post we will combine the ideas presented in part I and part II on building a GUI utilizing guide in Matlab. So far we have generated two graphical windows, one of which includes radio buttons, edittable text boxes, a drop-down menu, and a push button, and the second of which has a modifiable strategy table. The object now is to combine the two windows, and allow for proper user control of all of these components. Continue reading →
Last week we looked at the usage of guide in building a GUI. We included radio buttons, both editable and static text boxes, a drop-down menu and a push button. This week, we’ll create our second GUI to display a table (uitable). As all the decisions in blackjack hinge on two pieces of information: 1) the face up card of the dealer; and 2) the player cards, a look-up table can provide an optimal method for making a simple informed choice of whether to hit, stand, split or double down. Continue reading →
Users crave the ability to use graphical user interfaces (GUIs) to perform tasks. While command line input can be beneficial and easier to implement (see our previous post on user inputs), error handling and decision making can be more intuitive through a GUI. Over the next several weeks, we’ll demonstrate the wonderful capabilities of Matlab in creating such GUIs. Using the Matlab built-in GUI building tool guide, we will build a functional program that takes in user inputs and displays useful information. In order to make this exercise fun, we’ll be creating a GUI that provides the optimum strategy for decision making in the game of blackjack.
When running long code streams, waiting in front of the computer watching the program run can be excruciating. Sometimes I find myself doing this if I do not know how long the code will run, or if there will be errors returned. (I also sit in front of the computer because I enjoy watching cat gifs and the old school de-fragmentation screens, so who knows…) But you don’t have to! Go out and accomplish something else while your computer chugs away. With the useful command sendmail, we can send messages to our email or phone with some simple commands. Through this post, I’ll share some sample .m files that we commonly use to notify ourselves of code completion or errors.
In lieu of the holiday season, Matlab Geeks is going to take a small break from writing Matlab code. Instead, we’d like to share this great article on the best practices for scientific computing. Increasingly, scientists are writing computer programs to perform their research. However, most scientists only have rudimentary training in computer programming and do not know how to create efficient, reliable, and maintainable code. This brief article lists ten recommendations that can help increase the productivity of scientists and engineers. We have summarized the main points of the paper in this article. We try to use these recommendations ourselves and believe the dissemination of this knowledge will help the scientific computing community become more productive.