10.1   Creating a GUI tool step by step

10.2   Further GUI design considerations

Let’s suppose we have developed a model for a system we want to study. The system could be a physical system modeled by the relevant physical laws, e.g., Newton’s second law of motion, the Schrödinger equation, Kirchoff’s circuit laws, Maxwell’s equation, or chemical reaction-rate equations. It could also be a financial, sociological, or economic system model. In any case, the model needs to be expressed in a mathematically precise form. The model will consist of mathematical relations—these could be algebraic equations, differential equations, matrix algebra, and so forth. The model will also have some parameters that characterize the specific characteristics of a particular system, e.g., masses, voltages, concentrations, spring constants, or initial velocities.

The first task is to capture the mathematical model in a computational model expressed as a MATLAB program. This can often be a MATLAB script or function, which may call other user-written functions. Going from a model expressed mathematically to a computational model is itself challenging and involves some careful thinking about what one knows at the outset, what one doesn’t know, and how the relevant mathematics can be used to connect the two. The mathematical model must be transformed into a computational algorithm—a series of well-defined ...

Get Learning to Program with MATLAB: Building GUI Tools now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.