Skip navigation
32750 Views 18 Replies Latest reply: Oct 16, 2007 12:00 AM by TomGutman RSS
Copper 738 posts since
Jun 5, 2003
Currently Being Moderated

May 16, 2006 12:00 AM

Mathcad, Mathematica, Matlab, and maple

what are the differences in those softwares? which one is more powerful? is it better to stick with one software?

�Tell me and I�ll forget;
�Show me and I�ll remember;
�Involve me and I�ll understand

Ancient Chinese Proverb
  • superres Silver 7,759 posts since
    Jun 1, 2007
    Currently Being Moderated
    May 16, 2006 12:00 AM (in response to Wave-disabled)
    Mathcad, Mathematica, Matlab, and maple
    On 5/16/2006 4:05:54 PM, Wave wrote:
    >which one are you guys using?
    >
    >
    >�Tell me and I�ll forget;
    >�Show me and I�ll remember;
    >�Involve me and I�ll
    >understand
    >�Ancient Chinese Proverb

    It depends on the situation. I've got Mathcad, Matlab, and Excel. Small tabular things are often easiest to manipulate in Excel. Mathcad is usually my tool of choice, mainly because most of the problems I work on fit well in Mathcad.

    I've also got Mathematica 4.0, but have yet to really need to get it installed.

    TTFN,
    Eden
      • superres Silver 7,759 posts since
        Jun 1, 2007
        Currently Being Moderated
        May 19, 2006 12:00 AM (in response to Wave-disabled)
        Mathcad, Mathematica, Matlab, and maple
        On 5/19/2006 2:22:52 AM, Wave wrote:
        >For a Aeronautical Engineering
        >major (and maybe double in
        >Mechanical Engineering), which
        >one is best to play around
        >with it now?
        >___________________________
        >�Tell me and I�ll forget;
        >�Show me and I�ll remember;
        >�Involve me and I�ll
        >understand
        >�Ancient Chinese Proverb

        Still very broad strokes here

        Mathcad has a Roark and Young formulas module; works really well with units.

        Matlab has Simulink and modules for control systems, etc.

        TTFN,
        Eden
  • superres Silver 7,759 posts since
    Jun 1, 2007
    Currently Being Moderated
    May 16, 2006 12:00 AM (in response to superres)
    Mathcad, Mathematica, Matlab, and maple
    Mathcad --> most like a Swiss Army knife or a Weatherman combo tool. Does everything equally well, or bad, depending on your perspective.

    Matlab --> matrix manipulations are its forte.

    Neither of the above are particularly strong at symbolic math

    Mathematica and Maple --> symbolic math

    TKSolver --> parametric numerical problems; table oriented

    CalcCenter --> a scaled down version of Mathematica

    Almost all of the programs have student pricing for full-capability versions of the software.

    TTFN,
    Eden
  • superres Silver 7,759 posts since
    Jun 1, 2007
    Currently Being Moderated
    May 16, 2006 12:00 AM (in response to Wave-disabled)
    Mathcad, Mathematica, Matlab, and maple
    On 5/16/2006 5:06:46 AM, Wave wrote:
    >what are the differences in
    >those softwares? which one is
    >more powerful? is it better to
    >stick with one
    >software?

    �Tell me and I�ll
    >forget;
    �Show me and I�ll
    >remember;
    �Involve me and I�ll
    >understand
    �Ancient Chinese
    >Proverb

    A simple answer: would you only have a single screwdriver?

    "Power" like most other things in life is relative. Love and Anger are both "powerful" emotions, but should you only stick with one or the other?

    You might also add Mathematica's CalcCenter and UTS' TKSolver as other potential tools.

    TTFN,
    Eden
    • superres Silver 7,759 posts since
      Jun 1, 2007
      Currently Being Moderated
      May 19, 2006 12:00 AM (in response to Wave-disabled)
      Mathcad, Mathematica, Matlab, and maple
      On 5/19/2006 2:49:27 AM, Wave wrote:
      >when is it not broad?
      >___________________________
      >�Tell me and I�ll forget;
      >�Show me and I�ll remember;
      >�Involve me and I�ll
      >understand
      >�Ancient Chinese Proverb

      If you're talking a specific problem in a specific field.

      It's equivalent to asking what's the best tool for building a house. You'd need a full toolbox for that.

      If you ask about what's the best tool(s) for installing a stove, you could probably get an answer in reasonable detail.

      TTFN,
      Eden
      • TKHunny Copper 2,520 posts since
        Sep 25, 2009
        Currently Being Moderated
        May 27, 2006 12:00 AM (in response to superres)
        Mathcad, Mathematica, Matlab, and maple
        Your real answer, I think, is the one that makes the most sense to you and does what you want it to do. If there are similar capabilities, familiarity may be the deciding factor. You can talk an research forever. If you don't get your hands on something and try it out, you'll never really know.

        My 2�
            • TomGutman Silver 10,537 posts since
              Oct 22, 2006
              Currently Being Moderated
              Oct 13, 2007 12:00 AM (in response to Wave-disabled)
              Mathcad, Mathematica, Matlab, and maple
              Hi. Long time no sea.

              I don't know how long a long way you have to use, but 95 lines seems a bit much for part a. Perhaps you need to spend a bit more time in the Mathcad documentation and the collaboratory.

              Here's my take on part a. It's done mostly for MC11 (I don't remember what version you have) although one example is for MC13.

              Solving the tridiagonal system in Mathcad is a cinch, if you just ignore the tridiagonal structure and apply lsolve. I don't know the Thomas algorithm, but I do have an efficient solver embedded in my cubic spline routines. I don't have time to extract it right now (other things to do -- I'll probably have some time a bit later).

              Part c is underspecified (as written -- there may be more context that makes it clearer). What sort of fit? How many knots, and where located? There are many ways to use a spline, of whatever order, to fit points. Mathcad has built in facilities for linear and cubic interpolations, with the knots at the data points, but not quadratic. jmG has plastered the forum with B-splines, using the given points as control points (which attract the curve, but are not usually on it). With a bit of work you can do least squares fit, once you specify the desired constraints. With the knots at the data points and continuity of one less than the spline order you get an interpolation (you have enough degrees of freedom to fit the points exactly).

              � � � � Tom Gutman
              Attachments:
    • TomGutman Silver 10,537 posts since
      Oct 22, 2006
      Currently Being Moderated
      Oct 14, 2007 12:00 AM (in response to Wave-disabled)
      Mathcad, Mathematica, Matlab, and maple
      I've had a bit of time, and here are solutions to part b. I have three solutions: An explicit solution based on inspection of the system, a direct solution based on Mathcad's matrix algebra capabilities, and an efficient solution based on a general tridiagonal solver (but tailored to this system, just as the model was tailored to the system for cubic spline interpolation). I don't know the Thomas algorithm (at least not by name) so don't know how close this solution is to what is asked for.

      The comparison of single precision and double precision is not possible in Mathcad -- Mathcad in designed to maximize the chances of a correct answer and is not interested in how to get an incorrect answer.

      The spline part remains ambiguous. And I don't have the equations for a parabolic spline interpolation (I expect that is something that would have been covered either in class or in your textbook).

      How much of advanced language facilities are you allowed to use? If it turns out that the restrictions are essentially to what is included in a basic C compiler (without added libraries) then you might as well use C. Mathcad is a great math tool, but a poor C.

      � � � � Tom Gutman
      Attachments:
  • TomGutman Silver 10,537 posts since
    Oct 22, 2006
    Currently Being Moderated
    Oct 15, 2007 12:00 AM (in response to Wave-disabled)
    Mathcad, Mathematica, Matlab, and maple
    >>Is it possible to transfer your work in mathcad to matlab?<<

    Most likely. Although I don't know Matlab and so don't know what would be involved. The program structures should transfer fairly directly. Just about all programming languages have a for loop (or equivalent) and array subscripts. Range variable loops might have to be converted to explicit for loops -- depends what sort if iterators are provided for. I would expect Matlab to have the equivalent of lsolve. But would you be allowed to use it? What about matrix inverses? Mathematically lsolve(M,V)=M-1·V (although lsolve is generally faster and more accurate). Can you use a built in matrix inversion function?

    I gather that the splines you are looking for are interpolating splines. Some thoughts on the quadratic:

    Quadratics require three parameters. But they can be parameterized in many ways. The coefficients of the power expansion is one way, but often not the simplest one.

    One parameterization that might be useful here is the values at the two end points and the derivative at the starting point. You should be able to work out an equation for the value at any point given these values (you can see something similar in my cubic splines worksheet, where I work out the derivations, over in the Mathcad collaboratory). And you should be able to work out the derivative at the end point, again given these three values. For the spline, you can assign an arbitrary value for the derivative at the first point. That will establish the value of the derivative at the second point and, by C1 continuity the derivative at the first point of the second quadratic. Thus the quadratic for the second interval is determined. You can continue this to get the quadratics for all the intervals. You are thus left with one degree of freedom, the initial derivative, and have to choose some criterion for deciding what it should be.

    Tom Gutman
  • TomGutman Silver 10,537 posts since
    Oct 22, 2006
    Currently Being Moderated
    Oct 16, 2007 12:00 AM (in response to Wave-disabled)
    Mathcad, Mathematica, Matlab, and maple
    >>Yep. What is so great about cubic spline? in matlab there are linear spline function and cubic spline function, but there is no quadratic spline function.<<

    Not really much point to quadratic splines. You'll notice that Mathcad has the same -- a linear spline (linterp) and three cubic splines (and I have a further two of those). Most theoretical algorithms require C2 continuity, provided by cubic splines, whereas quadratic splines only provide C1 continuity. And because the equations involved turn out to be a tridiagonal system, it's almost as fast to do the cubic splines as the quadratic splines -- both will have a linear time for the precalculation. And since cubic splines have two spare degrees of freedom the arbitrary condition to resolve them can be symmetric on both ends -- much more elegant. Oh, and the cubic spline has a particularly elegant parameterization, where two values stored at each node (y and y'') provide the four parameters for each interval.

    >>It would be nice if you can direct me to the specific files that you are referring to. thanks.<<

    Just search the Mathcad collaboratory for cubic splines and my name. You should find the post. The base file name is "cubic splines.mcd", but there have been several versions so there will be a parenthesized version number (added by the collaboratory), and I don't remember how high that went. Or post in the collaboratory and I can try to find the relevant post. Links to posts don't work well across collaboratories.

    Tom Gutman

More Like This

  • Retrieving data ...

Bookmarked By (0)