28490 Views 11 Replies Latest reply: Sep 5, 2012 3:36 PM by JohnRudnicki
80 posts since
Aug 8, 2001
Currently Being Moderated

Jun 11, 2012 8:29 AM

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.

Attachments:
• 27 posts since
Jan 21, 2010
Currently Being Moderated
Jun 11, 2012 9:44 AM (in response to JohnRudnicki)

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

• 1,762 posts since
Nov 28, 2006
Currently Being Moderated
Jun 11, 2012 9:50 AM (in response to JohnRudnicki)

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."

• 1 posts since
Aug 20, 2012
Currently Being Moderated
Aug 20, 2012 9:20 PM (in response to JohnRudnicki)

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

• 6,158 posts since
Sep 26, 2008
Currently Being Moderated
Aug 20, 2012 10:44 PM (in response to ptc-4695363)

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!

• 27 posts since
Jan 21, 2010
Currently Being Moderated
Aug 21, 2012 12:28 PM (in response to ptc-4695363)

In my opinion, Mathematica is best for mathematicians.  If you are going to be doing a lot of "number-crunching", particularly if your numbers are ASCII strings in a file, and you are doing fairly simple things with them and want something quick, MatLab isn't a bad bet.  It is basically an "interpreter" (like BASIC), and is definitely a "text-based" language (so you'll have some syntax to learn).

However, if you are going into engineering (as you are), and are likely to be doing a mix of data analysis (which includes number-crunching) and possibly some theoretical/experimental work (I notice you're taking a Probability class, so you might do some Monte-Carlo type simulations, such as estimating pi by figuring out the probability that a needle lands on a line when dropped onto a set of evenly-spaced parallel lines spaced the length of the needle), you'll probably find that MathCad is more intuitive, easier to learn, and has tools (such as the ability to create "text" documentation, to have the "program" and graphs be readable by people who don't know MathCad, and to include units to prevent mixing inches and meters inappropriately) that get the software "out of the way" of solving the (engineering) questions you really want to ask.

• 649 posts since
May 12, 2010
Currently Being Moderated
Aug 23, 2012 4:32 AM (in response to ptc-4695363)

I am a physics PhD student @ UNH. I own (30+ years)and operate my own scientific engineering company. (Coming back to school is a journey in itself after so long, but that is for another time. ;-)

I have been using Mathcad for decades (since the mid 1980s? V1). I am an early adopter of tools that show promise, and Mathcad was one of those. For some time, it was the only tool that did what I needed, though other tools had/have their own strengths. I now use Mathcad 14/15 (1st choice), MATLAB (2nd choice), Maple (3rd), and just began looking into Mathematica. I use Mathcad 15 rather than Prime 2.0 because of shortcomings in Prime, but Prime is now getting up to steam, so I try to develop in parallel until Prime fails me, then I switch back to M15. The problem with that approach is that there is no converter for Prime > M15, but there is M15 > Prime, so I will not commit any serious work at this point to a draft in Prime, expecting that I will want to redo it in M15. Prime 2.0 is not the tool for you as a PhD candidate.

I find Maple very powerful as a math analysis tool...much more so than Mathcad. Great solvers and plotting features. But the user interface is arcane, units are handled in a manner that seems unique to Maple, and is not a clean process (through Maple 16, at any rate), and documents are not easy to format unless one accepts the Maple presentation style. All these items have been on the table for years with the folks at Maple, so I don't expect changes soon.

MATLAB is very powerful, and includes data handling features that I need in my work (space plasma physics) that are not available in Mathcad. In addition, programming is more intuitive in MATLAB for me (extensive background w 3G, 4G programming languages) than Mathcad. It is fast, well supported by MathWorks, has a great user community, has a student license, and is far, far, far, far, easier to manage, license-wise, than any PTC product. The same goes for Maple. I currently run several versions of Maple and MATLAB side-by-side on the same platform, with no problems.

Mathcad 15 is the fastest to prototype models in, and the units checking is one of the most valuable features. I recently "checked" a published equation that I wanted to use, only to find that it contained en error, an error that would have been much more difficult to find without unit checking. (Complicated expression involving current-voltage characteristics of swept Langmuir probes in tenuous plasma.)

One of MATLAB's weaknesses is its graphics capability (can't even get sub-tick grid lines on plots). Here at the U, math and physics folks disdain Mathcad as a toy, and prefer Maple. Over in Engineering, folks use Mathcad extensively. I have been "sneaking" my work by in Mathcad, while some of my peers think that I am using MATLAB. As a result of Mathcad's (14/15) better document features, I have been erroneously dubbed the king of MATLAB ;-) OTOH, I am currently working with data files in CDF (Common Data Format), not available in Mathcad.

MATLAB offers a very intuitive, text-based programming environment, comfortable for me because of my history. I consider the programming UI in Mathcad unintuitive in many instances, and even after years of [infrequent] use I find myself stumbling and coming here for advice.

In summary, I find Mathematica to be an intriguing prospect for the future, with it's own direction that fills an important niche. If you were an undergad or a math major, I might recommend Maple (different reasons for each case). I recommend getting a student license for both Mathcad and MATLAB, and using them regularly. Use M15, not Prime. Use the Mathcad and MATLAB forums often for browsing and seeking help. My experience is that help is very forthcoming when one shows a good faith effort to solve the problems. All of the tools have their peculiarities, and all will require a learning curve. I consider Mathcad and MATLAB to have the shortest curves, with the biggest ROI.

~R~

• 2,092 posts since
Feb 20, 2007
Currently Being Moderated
Aug 23, 2012 1:08 PM (in response to Ninetrees)

+1. I fully concur with Rich's assessment. I use MathCAD and Matlab and they have complementary strengths.

I only wish MathCAD would drag across some of the N-dimension handling, the ease of programming, and the range selection (e.g. matlab's colon (:) operator) and it would have a much better chance of success in my market area (reseach->product development).

At the moment it looks like PTC is focusing on 'drawing office support' style calculations, which doesn't bode well for the advanced analytic and concept development style working that most of MathCAD'd historic clientele was involved with.

Philip

• 649 posts since
May 12, 2010
Currently Being Moderated
Aug 24, 2012 5:33 AM (in response to PhilipOakley)

~R~

More Like This

• Retrieving data ...

Legend

• Correct Answers - 3 points