II. Matlab Refresher
Learning Objectives
- Refresh understanding of the Matlab environment
- Establish best practices for creating and saving m-files
- Build confidence in creating, manipulating, and determining sizes of vectors and matrices
- Grow familiarity with Matlab’s built-in functions
- Gain proficiency in producing plots with proper captions, axis labels, colors, and linetypes
- Strengthen ability to loading data sets (Excel, txt, etc.) into the workspace
- Appreciate Matlab as a powerful tool for performing engineering analysis and communicating results
This chapter was revised and remixed from A Guide to MATLAB for ME 160 by Austin Bray and Reza Montazami which is licensed under the CC BY NC SA 4.0 International License.
Individuals employed in engineering careers attempt to solve engineering problems using the tools and information available to them. In situations where engineering is needed to interpret, modify, or use data or other mathematical information efficiently the engineer may turn to a coding language to help them complete a task. A computer code functions by telling a computer a set of instructions created by the individual who wrote the code. In addition to running electronic devices around the world, computer code can be written by an engineer to compute mathematical operations, create a graphical depiction of data, or complete work much faster than the engineer would have been able to do by hand. By learning to code, engineers gain a useful tool to use when solving problems, studying data, or completing calculations within research or industry.
Here, students will be reminded of how to use MATLAB as a tool that can be used to solves problems engineers encounter within their education and their careers. To ensure students are best able to code with MATLAB, this guide has been adapted as a reference that supplements the content delivered in previous courses, being addressed by the instructor of this course, and/or other programming texts. This first section provides a general history and introduction to coding and the MATLAB program, providing background knowledge for students as they begin to explore the MATLAB program.
The History of MATLAB
The original versions of the modern MATLAB program were developed not as a unique coding language but rather strictly as a tool to compute matrix operations. This is evident as its current name, “MATLAB”, is short for matrix laboratory. Initially derived in research papers by J.H. Wilkinson at the National Physical Laboratory, computerized matrix and eigenvalue calculating methods were developed in the late 1960s. Researchers at Argonne National Laboratory later created the software EISPACK and LINPACK, which completed matrix/eigensystem and linear equation calculations, respectively, based upon the coding language Fortran.
By the 1980s Dr. Cleve Moler and his colleagues wrote the programming language MATLAB to make existing programs including EISPACK and LINPACK accessible without needing to use the coding language Fortran. As MATLAB was introduced to Moler’s Stanford classes, Moler collaborated with Stanford graduate student Jack Little to commercialize the software. Since 1984 when the first commercial version of MATLAB debuted at the Institute of Electrical and Electronics Engineers’ Conference on Decision and Control, the program’s capabilities have been expanded to encompass usages in more applications. Significant mathematical topics which have been added to the MATLAB software include differential equations, an assortment of data collection types, and an improved user interface that includes customizable windows depicting everything the user needs to read, edit, and understand a MATLAB code.