I know this *barely * counts as a programming topic, but which tool do you prefer and why? Having used both I prefer Excel hands down, although I don’t have a whole lot of Matlab experience. I’ve also used MathCad, which is great for doing reports and documentation but for calculations it’s like having one pencil tied behind your back.
I’ve heard strong opinions from both camps, so let the war of the words (or numbers) begin. I would have made this a poll but I didn’t think the Matlab guys could figure out how to use something that has all the information on one page.
It’s really not fair to compare these two programs. They are designed for different tasks. Excel is a spreadsheet program, Matlab is not. I believe Matlab is short for matrix laboratory.
“MATLAB is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numerical computation. Using MATLAB, you can solve technical computing problems faster than with traditional programming languages, such as C, C++, and Fortran.”
I do like excel though. That program can do more then most people give it credit for!
Once you really get to know Matlab, you’ll become addicted to it, and you will start writing m-files for the simplest calculations, just in case you’ll need to make that same calculation again. I haven’t used Matlab in a few weeks, and I’m actually going through withdrawals. I have tiny pangs of nausea when I have to use a calculator or ::gasp:: pencil and paper.
But seriously, even if you’re just comparing data analysis capabilities of both, it really depends on the application.
I do have a soft spot in my heart for the fancy ways you can organize data in Excel. If you haven’t already, you should check out “Excel Hacks” by O’Reilly.
In general, for ANY calculation task, Excel people will try to solve it in Excel, Matlab people will try to solve it in Matlab, regardless of whether the program was designed to do it or not. Using Goal Seek and Solver in Excel, I can do alot of iterative solutions that the general spreadsheet user doesn’t do but the capability is there.
I’ve even seen people jump into Excel or Matlab to do a quick calculation, when the Windows Calculator accessory would to the trick just fine.
For me, Excel = virtual scratch pad for calculations.
I am a devout Excel user. The Visual Basic environment behind Excel (Formerly VBA) makes Excel awesome for a mechanical guy who wants to make a small custom program to run calcs, but doesn’t want to write a full blown program.
I used Matlab in college in my controls classes and it was awesome for that, but I haven’t used it for anything else since I have been in industry.
The other program I use is Mathcad. It is also very good. Its symbolic solver is out of this world. Robot kinematic derivations are easy to follow in Mathcad and to derive. I very often do a derivation in Mathcad and put the results in an Excel environment for rapid calculations of different scenarios.
I use Excel on a regular basis, and when it comes to quickly summing, averaging, and doing simple manipulation on smaller sets of data, I wouldn’t use much else.
When engineering though, it’s like comparing apples to oranges. The first jaw-dropping experience I had with Matlab was a 2nd year Signals and Systems lab at Kettering University (formerly GMI).
We modeled a few simple circuits: low-pass, high-pass, band-pass and notch filters. The aspiring EEs and CEs among us know that these simple circuits can be broken down into equally simple equations (the impulse response). At that time we’d just learned about calculating a system’s response by convoluting the input function with the impulse response, and how exhausting of a process it was to do manually.
And then came MATLAB…
We sampled about 5 seconds of audio at 44.1kHz 16-bit, and got a nice big dataset into MATLAB. Then we played back the convoluted result… all within MATLAB. It was insane…
In short, we we able to model, test and tweak an audio filter without ever touching a single capacitor, inductor or resistor. We could adjust any one of our parameters, and instantly hear the results.
It was at that moment I understood the difference between an engineering math package, and Excel.
It was also at that moment how much money I could make with a hammer, a microphone, MATLAB, and a penchant for making things quieter =)…
MATLAB all the way for me (and yes, it does stand for Matrix Laboratory). If you can get the hang of thinking in matrices (e.g. doing tricky matrix indexing, performing operations on a whole matrix at once), and you like working at a command line (which I do), you can do some pretty amazing things very quickly and efficiently.
MATLAB just seems to have a habit of having exactly the function I need - Karthik and I go back and forth about MATLAB and Excel all the time, and once we had a problem where we needed to generate a random permutation of the integers 1 through n. A quick look through the MATLAB help file, and I found randperm(n)…
The other nice thing about MATLAB is that you can actually do (gasp!) for-loops, if statements, functions, etc. (All right, I know there’s an ‘if’ command in Excel, but it’s not the same). And if you have large, dynamically-sized sets of data to work with, there’s really no comparison.
And yeah, in Excel you can check multiple cases easily, but I prefer to get my calculations right the first time…
At Purdue last semester we used both in ENGR 116, which is the Honors Engineering Computer Problem Solving Tools thing class (I really don’t remember the actual name) but I found that they were both extremely useful. In practice, we used excel to do some pretty sophisticated modelling of arm torque, which could have just as easily been done in MATLAB. Our drive calculations (insert shameless plug here for you to go look at our drivetrain pic for this year) were done in Excel, mainly, to combine motors and stuff, but I’m currently working on a Matlab script that will be handy for gearbox construction.
I use Matlab 95% of the time. The only time I use Excel is for Goal Seek.
Matlab is MUCH less user friendly than Excel. Excel is really easy and intuitive to use, but much less powerful, especially for big-time number crunching.
I think that people that like Excel much better just don’t know Matlab well enough to use it efficiently. That is okay - Matlab takes a long time to learn. Why go through that learning process when you can use Excel and do it NOW. Since I am so fluent in Matlab, I can usually do anything in Matlab in about half the time it takes me to do it in Excel (and the results always look prettier).
I use Matlab/Simulink to help program the next generation of Hybrid Powertrain Controllers in my day job for General Motors. Other automotive
companies have announced that they are doing the same.
I have used Excel for spreadsheet operations and consider it to be
a “killer application”, a software program that makes you buy a computer
just because of what it does by itself.
Comparing Matlab and Excel in my opinion is like comparing two kinds
If you limit Matlab to just Matlab you are only operating “on the tip
the iceberg” as to it’s true power. Simulink is a Matlab based program that
allows the user to program embedded controllers using another Matlab
based program, the Real-Time-Workshop. In high school and undergraduate college, most of your mathematics do not involve matrix math. In graduate school, Matrix Math is used to describe control systems and Matlab is the
tool of choice to help solve those problems.
In 2004, FIRST upgraded the controllers from P-basic to C-based
controllers. At GM, we began using higher-level programming languages
like C in 1996, almost 10 years ago. My predicition is that in about
2010, FIRST will introduce Matlab/Simulink/RTW toolset to allow FIRST
teams to program the next generation of robots.
If you go on to engineering school, you will most likely be exposed
to Excel and Matlab/Simulink.
Great points. I use Matlab/Simulink every day for about 5 hours a day. It is the usual tool I use in my day job.
As for higher level languages, we have been using TargetLink (a 3rd party extension of Simulink from dSPACE Inc.) to do auto code generation at work for about 4 years now. We have used TargetLink to auto code our autonomous control code ever since FIRST has introduced autonomous mode in 2003.
I completely agree that before long FIRST might consider adding RTW or TargetLink in order to help code the control portions of of the robot. I think the students will learn a lot from that.
The attached image shows the top-level Simulink model of our Waypoint controller.