You are on page 1of 2

A collection of thoughts on "Excel vs. MATLAB" - R. Herz <herz@ucsd.edu> The important question is not which one is the best.

They are both very good and they both can be used for most things you need to do. They are "different" and each is better for some tasks than others. Excel is great when you need to keep a table of your data (input, output, and descriptions) in front of you at all times, since formatted output is inherent in the tool. Excel is good for explaining things to business people and in presentations. MATLAB is best for sophisticated math, especially on large data sets and for things like matrix algebra, differential equation integration, Laplace transforms in process control, etc. Getting complex tables of formatted output in MATLAB can be a hassle though. When you have complex math calculations but need complex tables of formatted output consider: (a) doing the tough computations in MATLAB, then copy the data to tables in Excel (b) learn to program the tough computations in Visual Basic for Applications (VBA) which is the macro language of Excel, versions 5 and later. There aren't as many scientific and math subroutine libraries available for VB as there are in MATLAB, though. When you become an expert in one software package, the temptation will be to always use that package for everything. There is a natural activation energy barrier to switching to another tool that you know is probably better-suited to the problem but for which you will have to do some learning or re-learning. The challenge is to be able to decide when the advantages of switching will out-weigh the learning curve to switch. Student preferences in CENG 100 (AMES 153) in 1998: The ratio of students who said they preferred Excel to those who preferred MATLAB was roughly 5 to 1. Those who used Excel said they liked the visual nature of Excel. This is related to the fact that you can see all your numbers. Probably also that there can be some mapping of the relationship of numbers and calculations to the spatial location, e.g., later in time is down the spread-sheet, later in procedure at one time is to the right, group input variables together, etc. With the workbook structure of Excel versions 5 and later, one can put large matrices in separate sheets, then have the formulas and the output on another sheet. There are some drawbacks to being able to see all your numbers and calculations. The spread-sheet can become huge and you may have to learn advanced ways to navigate, split the window into sections, or collect important things together (inputs and final results) and put intermediate results off to the side. The fact that you cant always see all the numbers in RAM when running MATLAB actually is one if its big advantages. In MATLAB, you can manipulate large groups of numbers with simple one-line commands, e.g., x = inv(a)*y, where a and y might be huge matrices with thousands of numbers.

Excel users felt that Excel was easier to debug that MATLAB. Excel checks each cell entry for syntax as its entered, whereas you can put in a lot of syntax bugs while writing an m-file. Remember good programming practice and run and debug your program every time you add a few lines of code (note that this is easier in MATLAB than Fortran or C since there is no compile step.

You might also like