Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathcad, MATLAB, Maple & Mathematica

  1. May 7, 2011 #41
    I use matlab and there are its advantages and disadvantages:
    Advantages:
    It lets you work in Matrices easily. It lets you do some complicated calculations quickly, without having to write a whole program or spreadsheet. Tons of add-ons and workbenches available to do a variety of tasks.

    Disadvantages:
    Just about everything else: horrible syntax, horrible development environment, dynamic types, not OO, a software development nightmare. It wasn't developed from a software development perspective, and it shows. Every lesson learned from the 30+ years of software development has been lost on this application, which forces users to do things that make any sensible software developer cringe
     
  2. May 7, 2011 #42
    From my limited experience with Matlab, I wholeheartedly agree with this. Matrices are so much easier to enter in, etc, than in Mathematica. But I hate the way it works.
     
  3. Nov 11, 2013 #43

    DrDu

    User Avatar
    Science Advisor

    I am a bit discontent with this thread.
    It would be nice for someone who knows all three programs to sum up their respective capabilities.
    I have worked with both Maple and Mathematica, but >5 years ago. I used to do analytic or symbolic computations and computed e.g. high order Pade approximants which required the ability to calculate with floating numbers of high precision.
    At least at that time, I perceived matlab as a program to do numerical, especially matrix operations, and more taylored towards engineering needs.
    I preferred to code matrix operations manually using lapack and the like, so I did not see a need to cope with matlab.
    How are the symbolic capabilities of matlab today, e.g. like finding an asymptotic expansion of the Macdonalds function with complex index?
     
  4. Nov 11, 2013 #44

    Pythagorean

    User Avatar
    Gold Member

    You can do OO in matlab. the syntax is a lot like c except that its not hardtyped.
     
  5. Nov 12, 2013 #45
    Hi, folks,

    I'm looking to put together a toolset outside of Excel that will be used for risk analysis, forecasting, and eventually developing machine-learning algorithms for a financial services company. Excel is undeniably entrenched in ours, as in most, businesses, and that's fine. It's useful, and I think the best Microsoft product. But I'd really like to be able to work at a deeper level, both logistically and analytically, as we try to do more with our data, and as I learn how.

    I'm a fan of Python though still basically a neophyte. I've similarly been a fan of the Sage project (http://www.sagemath.org/) for a while and puttered around with it. I'm not sufficiently committed to nor proficient in either, nor any other particular platform that might be used for data analysis.

    Which is to say I'm in a position to need some more power tools and while I'm slightly predisposed to trying Python (using, perhaps, the pandas and scikit-learning libraries as well as Sage, which is developed in Python also) I'm not beholden to any particular system. I've just looked at Mathematica for the first time in a while, and considering how broad its reach is now (e.g., all of periodictable.com--built by Wolfram Research co-founder Theodore Gray--is generated with Mathematica) I'm intrigued. Matlab seems perhaps more focused on the functionality generally collected under the umbrella "data analysis". Either is, I'm sure, more than capable for beginner-to-intermediate sophistication. There are, of course, a variety of other options to consider as well.

    Buying into Matlab and Mathematica, though, is buying into some amount of proprietary technology. Conversely, starting with Python or R or other open-source tools probably means building more infrastructure by hand. Each sounds interesting, and there's some potential for overlap as they can talk to one another. But we'll be (I hope) building a department around this functionality and I'd like to start us out on solid footing.

    I would defer to what our tech platform uses, but we're a small business that lives on Microsoft Office, Google Apps, and a bespoke PHP application, so there's not much constraint there.

    Thoughts?
     
  6. Nov 12, 2013 #46

    Pythagorean

    User Avatar
    Gold Member

    Matlab is not the first choice for symbolics. I've come to love it for numerical simulations, data visualization, and data crunching. I personally love the syntax with regard to flow control: it's very simple and straightforward, like python.

    Edit: we use maple for abstract algebra and I think it's tops for that, but their numerics aren't as well thought out as something like matlab, imo.
     
  7. Nov 12, 2013 #47

    Pythagorean

    User Avatar
    Gold Member

    I don't know about the others, but matlab works great with Excel. I would say if you want all the packages and technical support are willing to pay for it, go with matlab. But if you have the time to write your own scripts, hunt down non-standard packages, and learn to use them without tech support, then python is the cheaper option.
     
  8. Nov 12, 2013 #48
    Hi, Pythagorean, and thanks for the response. Interoperability with Excel is pretty key, as we'll never get rid of it. Especially if we can tie whichever CAS/numerical system into a high-end backend for Excel, it should be a good option. I'd like to remove a lot of the grunt work we now do in Excel to something such that Excel is a dumb terminal to the CAS/numerical system, albeit a dumb terminal with some light analytical tools.

    Looking at Mathematica, they (predictably) also have Excel-facing functionality. However, it's an additional package costing US$249. Is Matlab's support more native?

    If this fits better in a separate thread, I'm happy to take that up, but I figured so many people ask about these packages (thus this sticky thread) that I'd keep it here.
     
  9. Nov 12, 2013 #49

    Pythagorean

    User Avatar
    Gold Member

    The functions are called xlswrite and xlsread and I'm fairly sure they're standard. Matlab also has an open file exchange where you can download free usermade packages and functions.
     
  10. Jul 22, 2014 #50
    Hi friends,

    First of all, sorry if my question sounds a bit elementary.
    I am have just started to use the 'ScientificErrorAnalysis' package in maple 17.
    I have some functions like:
    f:=Quantity(10+2*x+x^3,0.4*x)
    and I want to have the derivative of them.
    When doing diff(f, x), maple give me

    (D[1](`ScientificErrorAnalysis:-Quantity`))(x^3+2*x+10, .4*x)*(3*x^2+2)+.4*(D[2](`ScientificErrorAnalysis:-Quantity`))(x^3+2*x+10, .4*x)

    What does it mean by D[1] or D[2]?!!!!
    Is it right if I just put
    Quantity(2+3*x^2,0.4)
    instead of diff(f,x) ?

    Sorry, but I am always so confused with all these error functions!!! :(
     
  11. Sep 9, 2014 #51
    plot streamline for this equation y=(ψ-ax3 –cx)/b

    hi

    Please I need your help to plot in wolfram mathematica to plot streamline for this equation

    To plot streamlines, we solve the given equation for either y as a function of x and c, or x as a function of y and c. In this case, the former is easier and we have

    Equation for a streamline:
    y=(ψ-ax3 –cx)/b
    A=0.5
    B=-2
    C=-1.5

    Thanks
     
  12. Feb 20, 2015 #52
    I've used all of these. Different tools for different purposes.
    Matlab is for number crunching. It's better for efficiently loading, analyzing, and plotting real data sets. By efficiently, I mean in terms of time spent writing code. Everything is a matrix, so it gets more clumsy when working with things which aren't matrices.
    Mathematica is better for symbolic math, and for plotting continuous functions (as opposed to tabulated functions).
    Mathcad seems to have a weird purpose, when demonstrating the calculation to someone else is important. It is kind of interesting since it has the appearance of working on a piece of paper, which perhaps makes it better for presenting the calculation and results to an audience. The audience doesn't have to read code to appreciate and understand what you have done. Since you can arrange expressions anywhere on the paper, you have artistic freedom in making it presentable.
     
  13. May 23, 2016 #53
    I haven't tried a project like that yet. One may have to develop a way to tell the particles to reverse the normal component of the velocity when it collides or hits a wall, and in the algorithm I have in mind, would involve continuously comparing the locations of the particles, and performing the reversal if the appropriate conditions are met. This may be a little tricky to implement with the conditional functions available in Mathematica. For instance, but correct me if I'm wrong, Mathematica doesn't have conditional "blocks" of code which execute together, something you'd commonly see in C++/Python.

    On the other hand, you could easily set up equations of motion through Hamiltonian mechanics and solve them numerically, but that would limit you to conservative potentials. It seems like a stretch, but maybe you could use delta functions as potentials? Prof. Corbin taught us how to simulate N-bodies which interact via gravity during one of his workshops. It is definitely good for certain simulations.
     
  14. May 23, 2016 #54
    Do you mean like so?
    Code (C):

    if (condition) {
       //Do some stuff that needs multiple functions
    }else{
       //Do other stuff with multiple functions
    }
    You can do that with Mathematica using semi-colons

    Code ( (Unknown Language)):

    If[ condition,
         (* Condition evaluates as true *)
         temp = Table[ i, {i,1,100}];
         tempSquared = Table[i^2, {i,1,100}];
         tempSum=Sum[temp,{i,1,100}];
         tempSumSquared = Sum[ tempSquared, {i,1,100}];
         difference = tempSumSquared-tempSum; ,
         (* Else block *)
         temp = Table[ i, {i,1,100}];
         tempCubed = Table[i^3, {i,1,100}];
         tempSum=Sum[temp,{i,1,100}];
         tempSumCubed = Sum[ tempCubed, {i,1,100}];
         difference = tempSumCubed-tempSum;
    ]
     
    It is harder to read in a notebook though.
     
  15. May 23, 2016 #55
    Yes, thanks for the correction. I didn't know you could do that. Does Mathematica have a simple way to implement more than two cases (in other words an equivalent to C++ "else if")?
     
  16. May 23, 2016 #56
    As far as I know it doesn't exist. You should read the docs to make sure I didn't forget something.
    You could define a similar function yourself though.

    Thinking about it for a while you could hack something together using the Which-function from the docs.
    This discussion should be a separate topic.
     
  17. May 23, 2016 #57

    DrClaude

    User Avatar

    Staff: Mentor

    Since Mathematica executes different code depending on whether the condition is true or false,
    the functionality of "else if" can be implemented by nested if's:
    Code ( (Unknown Language)):
    If [ , , If [ , , ] ]
     
  18. Dec 10, 2016 #58
    I have been using octave instead of matlab. For the user, they seem almost the same, but octave is free software and matlab is proprietary.
     
  19. Jul 5, 2017 #59
    I use Matlab for numerical calculations. The language is very easy. It is on the other side very expensive. I use Maple for symbolic calculations.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted