Modeling with ODEs in Matlab – Part 5B

And so we reach the end. We will wrap up this series with a look at the fascinating Lorenz Attractor. Like the logistic map of the previous lesson, the Lorenz Attractor has the structure and behavior of a complex system. Unlike the logistic map, the Lorenz Attractor is defined by a system of first order autonomous ordinary differential equations. Thus, it is a perfect example to use for this last lesson where we examine the importance of error tolerance in evaluation chaotic systems of ODEs.
Continue reading

Bookmark and Share

Modeling with ODEs in Matlab – Part 5A

We are going to wrap up this tutorial series with a fun exploration of complex systems. Complex systems behave in unpredictable ways. This often makes it difficult to design and use models to examine their behavior. In this lesson we will look at some hallmarks of complex systems and examine a canonical example. Finally, in the next installment we will look at how differential equation models of complex systems can be difficult to examine using numerical solutions.
Continue reading

Bookmark and Share

Modeling with ODEs in Matlab – Part 4B

Welcome to Modeling with ODEs in Matlab – Part 4B! The previous post, Part 4A, introduced the idea of fitting ODE coefficients to empirical data. We saw that proper use of the nlinfit function combined with ode45 or ode15s allows us to fit a model to data when given a good initial estimate of the parameter values. Unfortunately, this approach does not work as well if the initial guess is not within the basin of attraction of the best fit. Today we will look at a new approach to function optimization: Genetic Algorithms (GAs). Genetic Algorithms are part of a search family I like to call “intelligent randomized search”, which also includes techniques such as Simulated Annealing and Particle Swarm Optimization.
Continue reading

Bookmark and Share

Random Numbers in Matlab – Part I

In this series of posts, I will explain how to use the various random number generation functions in Matlab. This will include the usage of the basic commands, how to control random number generation, how to create other distributions from the basic functions that Matlab provides, and what alternatives there are to the functions used in Matlab. In this post, I will explain the basic random number generation commands in Matlab, including randrandnrandi, and randperm, and provide some example applications.

Continue reading

Bookmark and Share

A Blackjack GUI in Matlab – Part IV of using Guide

With this post we wrap up our introduction to using guide with a look at the usage of a push button and a drop-down menu in our creation of a blackjack strategy guide GUI. As a look back, or to catch up, you can visit our three previous posts: Part I: Creating the layout using guide; Part II: Setting up a table; and Part III: getting user input from radio buttons and text boxes. Finally, we have also attached all of the necessary code to the end of this post to do as you please.

Continue reading

Bookmark and Share