Matlab for engineers

<p>I am currently an ME student looking to go into AE for graduate school studies. I asked a professor what he thought would be the best programming language to learn for people like me and he said matlab.</p>

<p>What do you guys think is the best language to learn for engineers?
If it is matlab, what book do you guys suggest an engineer use to learn the language?</p>

<p>MATLAB is a high-level programming language, meaning that the syntax is relatively gentle and that there is a large number of pre-defined functions. MATLAB is pretty simple to learn provided you have taken a programming course in the past, and there are dozens of books out there but it has been too long since I have used one to be able to remember a title.</p>

<p>MATLAB should be fine for modeling and analysis, but you might use LabView to interface with instrumentation. It is possible as an ME/AE that you might find a niche where you would need to go to more versatile programming languages like C or JAVA, but that would be the exception, not the rule.</p>

<p>MATLAB can be learned pretty much completely by simply working on problems and using the help manual that comes with the program. Combine that with the massive community of MATLAB users that are online and you probably don’t need a book. Of course if you feel most comfortable using a book anyway, go ahead, though I can’t really suggest one.</p>

<p>I second the idea of perhaps at least familiarizing yourself with LabVIEW, but you can’t really do that in any meaningful way without actually having a DAQ system you need to apply it to, so it may not be a practical thing to learn without already having an experiment to apply it to.</p>

<p>C and Fortran get used a lot by the computational guys (both CFD and solid mechanics guys) but if you plan to get into experiments, you will probably not need it.</p>

<p>MATLAB isn’t actually a programming language, it’s a scripting language/math package. You don’t create programs in MATLAB per se, you create scripts. The primary difference between “real programming” and MATLAB is that you can’t send your program/script to just anybody as a compiled binary executable, only somebody with MATLAB can run the script. On the plus side, MATLAB is available for every important OS and a script you write on a Windows machine will run on a UNIX version of MATLAB just fine.</p>

<p>Most engineers don’t really need to learn real programming anyway, MATLAB is probably enough. If you want to make real software though, you need to study something like C or C++. Most of the principles are the same. While loops are while loops, if-else statements are if-else statements, etc. MATLAB just makes things a lot easier for you. MATLAB is a point-and-shoot camera, C is a full-frame DSLR.</p>

<p>And there is GNU Octave: [GNU</a> Octave](<a href=“http://www.gnu.org/software/octave/]GNU”>GNU Octave)</p>

<p>C is more like the DSLR camera body and you have to build your own lens. Very versatile but certainly not plug-and-play. ;-)</p>

<p>As someone recently trying to make the transition to Matlab from C++ I’d totally recommend just giving up on the included help file and using google instead. I was trying to find “get line” in Matlab and the help file wouldn’t return anything for my search. I got to google and search up “matlab equivalent of getline” and find out it’s fgetl. As in “file get line.” Arghhhhhghghghghgh.</p>

<p>Google just happens to be one of the most useful programming aides in existence.</p>

<p>Yeah google is better because it will send you to Mathworks’ online version of the Matlab help files as well as other resources. 9 times out of 10 Mathworks’ own help files are sufficient or even the best resource, you just need to be able to find the relevant entry to actually use it.</p>

<p>The title of this thread happens to also be the title of a good book for learning matlab. (chapman, I think the author is)</p>

<p>but from your original post, it seems that you’re not just interested in the utilitarian value of programming, but also in the craft of it.</p>

<p>In my opinion, matlab is too easy. It’s a very high-level language. To really learn how to program, learn C.</p>

<p>Yes, knowing how to use Matlab is very useful for engineers. As others have said, it is a scripting language rather than a real programming language, but it is a good place to start for someone without programming experience.</p>

<p>If you started learning Java or C++ you’d be spending your first big chunk learning I/O basics, handling variables, and control flow statements. MATLAB virtually does the first two for you. If you truly want to go on to learn real programming, you’ll want to move on from MATLAB after mastering loops, if-elses, and functions.</p>

<p>I forgot to check back on this thread.</p>

<p>I’d like to learn some sort of programming. The lab I worked at used labview quite often, but the professor suggested that matlab would be the best choice for my major. </p>

<p>For other programming languages, are they helpful for engineers liek C, C+, C++, and all the others that I don’t know about.</p>

<p>I didn’t even know labview had a scripting language, but then I only used it for one class so far…</p>

<p>LOL. C+ doesn’t exist.</p>

<p>Hehe, I used to think there was a C+ too.</p>