| | |
10-15-2012, 11:39 PM
|
#1 | | New Member
Join Date: Oct 2012
Posts: 2
| Matlab or C++
I am planning to major in Pure Math at UCD, and there is a computer programming requirement of either C++ or Matlab (applied to engineering problems). I'm not exactly tech-savy and I have never even seen a line of code before. So I'll cut straight to the point, which one do you think is easier to pick-up and pass?
I am not trying to become an engineer or anything, I just need this to fill my major requirement. But I do think MATLAB would help with the matrix theory I'll have to learn in Linear Algebra. I also heard C++ was more for programmers who build functions from ground up, and MATLAB was for engineers who needed to compute answers to a problem (although I honestly have no idea what any of this means). Help a lowly undergrad out?
|
| Reply
|
10-15-2012, 11:50 PM
|
#2 | | Member
Join Date: Apr 2012
Posts: 810
|
MATLAB is two orders of magnitude simpler than C++. If you're not actually going to use either of them, MATLAB is significantly easier to learn.
C++ is used for making programs. MATLAB is used for solving specific problems. C++ does way more, MATLAB is way easier to use. You make something like Microsoft Word/Excel/etc (the actual program itself) in C++, and you solve for a long and convoluted mathematical equation in MATLAB.
Hope that answers your question.
|
| Reply
|
10-16-2012, 12:05 AM
|
#3 | | Senior Member
Join Date: Dec 2010
Posts: 20,155
|
You may want to see what computing tools are used in your math department's numerical analysis course, your statistics department's courses, and perhaps other similar courses involving data analysis (e.g. in economics, engineering, etc.). MATLAB is commonly used for these types of things. Math 128A Syllaubs indicates that MATLAB was the preferred computing tool in UCD Math 128A fall 2008.
|
| Reply
|
10-16-2012, 06:20 AM
|
#4 | | Member
Join Date: Nov 2011 Location: Raleigh, NC State '14
Posts: 412
|
MATLAB language is very similar to C++. You can also make programs with Matlab. One great thing about Matlab is that it has a GUI development environment which is fun. The thing is, once you learn to program, you can easily shift languages- especially between C++ and Matlab, they have only small differences, with matlab being great as it will tell you beforehand if you have a mistake in your code. C++ on the otherhand will only do that if you have a good compiler. But if you can program in one, you can program in the other.
|
| Reply
|
10-19-2012, 12:09 AM
|
#5 | | Senior Member
Join Date: May 2009 Location: New York City
Posts: 1,456
|
For Math major, MATLAB is probably your first choice, then there is Maple and Mathemtica which are also very very popular among mathenticans. Wolfralpha is based on Mathemtica.
MATLAB is also a common prototyping language. You can make a GUI app out of MATLAB. Lots of CS professors do that. I even have a friend in BME did matlab app in a month for his neuron science research.
If you find programming interesting, please do learn C++. There is another language called Python which is extremely popular in the data analysis field. Python is magical and has NumPy, SciPy to do a lot of numerical, data analysis.
Last, if you are interested, there is an open-source language called Octave which tries to emulate the syntax of MATLAB. Basically, for your common MATLAB codes, you can just run that same M file in Octave without any problem, and you don't need a license like MATLAB. Just a side note.
|
| Reply
|
10-19-2012, 10:22 AM
|
#6 | | Junior Member
Join Date: May 2012
Posts: 144
|
C++ all the way. tougher but matlab will become a joke after you know some c++
|
| Reply
|
10-19-2012, 10:50 AM
|
#7 | | Junior Member
Join Date: Dec 2011 Location: Silver Spring, MD
Posts: 191
|
MATLAB is easier, but why not take both? You may find you like dabbling in computational math :-)
|
| Reply
|
10-19-2012, 01:36 PM
|
#8 | | Junior Member
Join Date: Feb 2012 Location: Mojave Desert, Calif.
Posts: 168
|
The two codes are used for different applications, so saying one is easier than the other is meaningless. Besides, MATLAB is based in C, and as a result, much of the syntax is the same. The difference lies in the application of each, where MATLAB is used mostly for problem solving applications and creating nifty plots. It can do these things quickly and easily. C/C++, on the other hand, is much more versatile in nature, but problem solving and creating plots with it is horribly inefficient and time consuming.
MATLAB is popular in engineering curriculm because it is aimed at problem solving applications. Also, it's ties to SIMULINK make it very useful for control theory classes.
|
| Reply
|
10-19-2012, 09:21 PM
|
#9 | | Senior Member
Join Date: Jan 2010 Location: California-> Socorro, New Mexico
Posts: 1,057
|
While I understand the sentiment of learning C++ first (I, too, started with C++), but one must consider the required results. The OP is not a computer science major, but a math major. His/her goal in learning to program is to facilitate with calculations of massive amounts of data. It will take considerable amount of effort and time to do what he can produce in Matlab in a couple minutes. It's just bad engineering practice to rebuild the wheel barrow every time you want move something heavy. Go with Matlab. Had you been a CS major, I would have recommended C (not C++, but C)
|
| Reply
|
10-22-2012, 08:31 PM
|
#10 | | Senior Member
Join Date: Feb 2009
Posts: 1,541
|
I agree with the above post. Go with Matlab. Matlab = Math lab.
If you have never programmed before, and don't have a big interest in programming, learning C++ is a challenge. You can do lots of powerful things with Matlab much easier.
|
| Reply
|
10-24-2012, 08:41 PM
|
#11 | | Junior Member
Join Date: Oct 2012 Location: Seattle
Posts: 39
|
Another vote for Mat(rix)Lab.
|
| Reply
|
10-24-2012, 09:24 PM
|
#12 | | New Member
Join Date: Apr 2012
Posts: 12
|
I'd suggest C++. It might be harder, but it looks much better on your resume that you know a programming language (no one really cares about MATLAB in the real world, and they usually use other programs).
|
| Reply
|
10-24-2012, 09:50 PM
|
#13 | | Senior Member
Join Date: Dec 2010
Posts: 20,155
|
Are you sure about the choices? UC Davis' web pages indicate that a pure math major chooses between Engineering 6 (using MATLAB) and Computer Science 30 (using C, not C++). Applied math majors have to take Computer Science 30 (using C) and 40 (using C++).
|
| Reply
|
10-25-2012, 12:14 AM
|
#14 | | Junior Member
Join Date: Oct 2012 Location: Seattle
Posts: 39
| Quote: |
(no one really cares about MATLAB in the real world, and they usually use other programs)
| Really?! How do you know? |
| Reply
|
10-25-2012, 12:29 AM
|
#15 | | Member
Join Date: Apr 2012
Posts: 810
|
In the "real world," it is true that Excel is generally far superior to MATLAB for practical purposes. Numerical approximations usually suffice for industrial purposes, and Excel deals with data in a much more effective way.
There's plenty more that could be said on the matter, but MATLAB is generally superior in research, where precision is more valuable than efficiency. Excel and the like are much better for the purposes of standard industrial work.
|
| Reply
| All times are GMT -4. The time now is 04:19 AM. |