Thursday, July 30, 2009

I have to choose between MatLab and C++ to learn this semester. Please explain the difference and...?

Would one be better to learn because other programs build upon it or do they not deal with each other? I have to take four classes for my GIS certificate: Java, C++, MatLab and Computer Science. Which one would be best to start out with between MatLab and C++? Also, do you know why I would use them as a GIS Tech?

I have to choose between MatLab and C++ to learn this semester. Please explain the difference and...?
If you have to start out with one or the other, I would probably suggest starting out with MatLab, simply because I think C++ will be harder to learn. From what I know, MatLab is software that enables the user to perform complex physics and engineering operations more simply than doing all of the calcs longhand. C++ is an actual programming language used primarily for embedded software, API's, and other complex programming tasks. As far as when you will use one or the other, I would imagine that you would use MatLab frequently, and probably just need a general knowledge of C++ in case you ever need to troubleshoot problems with embedded software. Just my thoughts - might want to ask a professor to be sure.
Reply:I strongly suggest MatLab for the following reason: C was built to be a very close approximation to Assembler. Its foundation is very low-level. To get high-level function takes either a lot of coding or the right libraries. Yes its fast - very fast, but its simple.





MatLab is a very high level language. Many very powerful functions require nearly no coding on your part. The kind of processing you are going to use in GIS are advanced and will take significant time in C or C++, but can be nearly one-liners in matlab. It allows graphic programming (through simulink) as well as text-based programming in a more standard IDE. It directly interfaces with a wide variety of data formats, and hardware or software interfaces.





One person with a rudimentary knowledge of PDE's, a good knowlege of the PDE toolbox, and a masterful knowlege of GIS could build a plausible simulation of the effects of an earthquake on a hillside in california using matlab in minimal time. Doing the same thing from the ground up in C++ would take a doctoral student a year.





Matlab has maple built in and can take in numeric data, sew it into symbolic expressions, and perform highly advanced symbolic manipulations on it and yield either symbolic, or numeric results.





After you know Matlab you can wire it so it executes C, Java, or Fortran natively using MEX tools. It makes those other languages a subset of the tools of matlab. That is not the case when you start with C.





MatLab is very good power in a very short time. The tools are built by the best in the business and tend to be very robust. They interface natively with a wide variety of formats your data is already stored in. It is a superset to a variety of existing lower-level programming languages. The current extensions to matlab cover significant scientific terrain - there are a lot of useful tools for very different areas in that toolbox.





Computer languages have to perform the same basic tasks in iteration, and control. Its easier to learn those in a simple language, then try to implement them in a more demanding, less human language. Learn your if, while, case, and for where the majority of your learning is understanding the method, and the minority is understanding an exacting syntax. After you understand the idea, then you can try to implement it in a more syntax-demanding language. Matlab is a simpler language to learn in, has easier syntax, and is easier to debug. C is famous for being tough to debug.





You could do a lot worse than to start with MatLab.
Reply:I personally disliked Matlab, but I did learn after I was quite familiar with C/C++ and Java.





Matlab is very easy to use, and it's especially useful for generating graphical representations (of mathematical functions).





C++ is the programming language that most modern programming languages are based on. But it's also much more difficult than Matlab.





I'd say go with C++, if you DO need to write code in Matlab files it is very similar to C++.





As I don't know what being a GIS Tech entails (I'm a software developer), I can't answer that... well aside that you can use them to make computer programs.

gift baskets

No comments:

Post a Comment