Skip to main content
15-Moonstone
June 11, 2012
Question

MathCad vs. Matlab?

  • June 11, 2012
  • 3 replies
  • 81294 views

Can someone (or several) offer some comments about advantages of one vs. the other? I realize that could be a long answer and I am just looking for some general guidance.

I have been a longtime MathCad user (though not necessarily a particularly adept one). Recently I decided to learn Matlab and started doing this by rewriting some Matlab programs in MathCad (although the reverse might seem more sensible). Although MathCad has obvious advantages for combining text and calculations in a more or less free form way, my impression is that MatLab offers many programming advantages. For example, fzero seems to work more robustly than root, MathCad seems to have no function equivalent to fminsearch or fminbnd, it treats NaN differently (MathCad returns 0).

Attached is a MathCad worksheet and the equivalent (?) Matlab files.

3 replies

1-Visitor
June 11, 2012

I've used all of the "M" systems (MathCad, MatLab, Mathematica, and Maple). It really depends on what you need to do in deciding which system is "best". Here are some considerations that I've used ...

I started with MathCad first. I needed something that would let me express mathematics to do some simple analysis, make a few plots (for my own edification and for teaching purposes), and, most important, would let me create documents that combined text, math (meaning equations, usually), and graphics that could be used for teaching or other didactic purposes.

At a certain point, I needed to analyze a lot of data, often multi-channel analog samples from a variety of sources. In some cases, complicated calculations involving these data needed to be performed. For example, I might want to know the 3-D orientation of an object (roll, pitch, yaw), given voltages measured by coils fixed to the object inside a stationary magnetic field. I used MathCad to develop and test the equations to take the signals (voltages) and convert them (through multiple steps, including getting "scaling" information from other files) into a series of three components representing roll, pitch, and yaw (these eventually were converted to rotation vectors). For doing the "number-crunching", involving multiple files and megabytes of data, I used MatLab, as I found it easier to handle the "point the program at the following directory and let 'er rip" with MatLab than with MathCad.

A number of years ago, I started working on an even more complicated problem involving vector-like objects in a six-dimensional space. I needed to be able to "point it at data", like MatLab, but needed more sophisticated math ability, like MathCad. However, the MathCad at the time (12? 13? I'm not sure) didn't seem up to the task. So I bit the bullet and tried Mathematica. This definitely has all of the "power" that I could imagine, particularly in the "solving" arena (which is where MathCad had let me down). However, its ideosyncratic syntax (basically, you need to learn an entirely different set of "rules" for things like parentheses, square and curly brackets, upper and lower case) gave it an extremely steep (and rocky!) learning curve, not something I would want to turn to for a simpler problem. While it does support the creation of documents that combine text and math, the math is in Mathematica syntax rather than looking more like equations we can intuitively grasp, as MathCad provides.

At this point, needing the math capability of Mathematica but wanting the syntax and ease-of-use of MathCad, I decided to try Maple, which I understood to be a MathCad "parent". I must confess I probably did not give it a fair trial, as I was put off by the difficulty of entering "math" into the system (compared to MathCad), and the relative lack of transparency and intuitiveness of the system.

I've just downloaded and installed MathCad Prime 2.0 (I "passed" on Prime 1.0 because it lacked 3-D plots and symbolics (both of which I use). I'm hoping and planning to "get re-acquainted" with MathCad for my algorithm development, modelling, and data analysis (not of the "number-crunching" variety, but I might decide to "give it a try" ...).

Bob Schor

23-Emerald I
June 11, 2012

John;

I like Mathcad! It's easy to learn to use (once you've climbed the "learn the editor" hill. You don't have to learn a programming language. (I'll concede that Matlab is much easieer than FORTRAN, but it's still a programming language.) Mathcad handles units. And I can do in Mathcad practically whatever others can do in Matlab.

In my experience, Matlab handles file I/O better than Mathcad. (Some people have been writing DLL's and scripts to address that, you can find a wide assortment here.) And I suspect that Matlab may have an advantage with HUGE quantities of data. (Mr. Jackson may have an input.) Matlab can create a page of graphs as a stand alone image; I really wish Mathcad could do that. But I can read a Mathcad sheet and understand it--it looks like hand written math. Pray tell, what is fzero? fminsearch? (Admitted: soome of the Mathcad functions can get isoteric too.)

Depending on your setup, cost may be an issue. According to my IT accountant, a Mathcad "seat" is much cheaper than a Matlab "seat."

From someone who has been advocating Mathcad for a long time.

15-Moonstone
June 11, 2012

Fred, Bob,

Thanks for the interesting comments.

Like Fred, I have been happy with MathCad and been able to do most of what I needed to do. But in my world (ivory tower academia), MatLab seems to be a much more popular platform. I put off learning it for a long time, but my recent motivation was in some MatLab programs for analyzing errors in shooting a basketball. I started out rewriting them in MathCad just to make sure I understood them. Along the way I realized I needed learn some MatLab – which led to my question. MatLab does seem to have advantages for certain operations (some mentioned by Bob), but I will likely need much more persuasion to be a convert. Nevertheless, it has been helpful and interesting to know a bit more about MatLab (though, as you may have judged by my previous posts, I am not by any means an expert in MathCad). As someone who cut his teeth on Fortran many decades ago, I have been happy to leave that in the past. I have friends who swear by Mathematica, but I am not about to tackle that or Maple.

1-Visitor
August 21, 2012

John/Fred/Bob,

I am a PhD student at the University of Kansas. Today was the first day of class. My Probability professor recommended that we purchase Mathematica. Before I go down that road, I thought I'd ask your opinion on which one of the discussed M software packages would be best suited for a PhD student majoring in civil engineering with an emphasis in transportation?

Any information that you guys can give is greatly appreciated.

-a lost PhD student

24-Ruby IV
August 21, 2012

I think if your professor knows Mathematica he recomends you this M software.

And if your professor knows Mathcad he recomends you this M software etc.

But I think Mathcad is better for future civil engineers!