![]() Moving data around between many functions required juggling lots of variables and frequent consultation of documentation about input and output arguments. However, design that was ideal for interactive computations, even lengthy ones, was not always conducive to writing good and performant software. There were more innovations, like baked-in complex numbers, sparse matrices, tools to build cross-platform graphical user interfaces, and a leading-edge suite of ODE solvers, that made MATLAB the place to do scientific computing at the speed of thought. No fiddly machine-specific libraries with low-level calls, just plot(x,y) and you saw pretty much what anyone else with MATLAB would see. MATLAB also made graphics easy and far more accessible. Writing a matrix multiplication as A*B and getting the answer printed out right away was a game-changer. But accessing them with the standard bearer in scientific computing, FORTRAN 77, was a multistep process that involved declaring variables, calling cryptically named routines, compiling code, and then examining data and output files. Letting the computer handle those tasks, and whisking data types out of the way, freed up your brain to think about the algorithms that would operate on the data.Īrrays were important because numerical algorithms in linear algebra were coming into their own, in the form of LINPACK and EISPACK. Furthermore, variables did not have to declared and memory did not have to be explicitly allocated. Floating point doubles weren’t the most efficient way to represent characters or integers, but they were what scientists, engineers, and, increasingly, mathematicians wanted to use most of the time. The IEEE 754 standard for floating point wasn’t even adopted until 1985, and memory was measured in K, not G. Both aspects of this choice, arrays and floating point, were inspired design decisions. Originally, every value in MATLAB was an array of double-precision floating point numbers. Julia, which began in 2009, set out to strike more of a balance between these sides. Python, which began in earnest in the late 1980s, made computer science its central focus. MATLAB, the oldest of the efforts, prioritized math, particularly numerically oriented math. When you do set cost aside, a useful frame for a lot of the differences among these languages lies in their origins. It’s a separate consideration from the Platonic appeal of a language and ecosystem. For many years, MATLAB was well beyond any free product in a number of highly useful ways, and if you wanted to be productive, then cost be damned. This is indeed a huge distinction-for some, a dispositive one–but I want to consider the technical merits. MATLAB, unlike Python and Julia, is neither beer-free nor speech-free. I will mostly set aside the issues of cost and openness. This experience has led me to a particular perspective on the three languages in relation to scientific computing, which I attempt to capture below. So partly as self-improvement, and partly to increase the usefulness of the book, I set out this year to translate the codes into Julia and Python. The book has over 40 functions and 160 computational examples, and it covers what I think is a thorough grounding in the use of MATLAB for numerical scientific computing. ![]() Yet so much comes easily to me there, and I have so much invested in materials for it, that it was hard to rally motivation to really learn something new.Įnter the MATLAB-based textbook I’ve co-written for introductory computational math. ![]() It’s reached a point where I have been questioning my continued use of MATLAB in both research and teaching. MathWorks must feel the same way: not only did they add the ability to call Python directly from within MATLAB, but they’ve adopted borrowed some of its language features, such as more aggressive broadcasting for operands of binary operators. ![]() However, it’s impossible to ignore the rise of Python in scientific computing. Knowing MATLAB has been very good to my career. (And before that, I even used MATRIXx, a late, unlamented attempt at a spinoff, or maybe a ripoff.) It’s not the first language I learned to program in, but it’s the one that I came of age with mathematically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |