10 ms·
Serious Question..... Matlab usage is on a dramatic downswing from my vantage point in quantitative fiance. I don't really know anyone under 40 who uses it an
by chollida1 10y ago
Serious Question.....
Matlab usage is on a dramatic downswing from my vantage point in quantitative fiance. I don't really know anyone under 40 who uses it anymore as one of their main tools.
And I've never once seen anyone use octave as a substitute, I'm guessing this is mostly due to money for licenses not really being an issue.
Nowadays, the only tools I see people using are R, python(pandas, numpy) and very occasionally Julia.
Where does this leave Octave? What's Octaves niche?
Or put another way, why learn Octave/Matlab when there are other languages out there that provide similar capabilities and that are much more popular?
- petters 10y agoI suppose Octave's niche is people who have been using Matlab, change employer, and no longer have access. Python + numpy + matplotlib + jupyter notebooks are superior to Matlab, IMO. And I used to be really into Matlab.
- santiagobasulto 10y agoSorry for my ignorance. What's the usage you give to those tools? What's your domain? And finally, how to get started with them? I'm highly interested on Data Science but it's hard to start, there's so much stuff going on.
- e19293001 10y agoYou might want to try installing anaconda[0]. After you have installed, follow the instructions here[1]. There are also lots of videos in youtube if you have not yet done a little bit of googling. By the way, this all requires that you know how to code in python else you can get your hands wet here[2]. Now if you already know how to code in python and know how to use jupyter, you're ready to learn about neural networks. This book[3] did a really good job in explaining the subject. And, this is what jupyter notebook can do[4]. [0] - https://www.continuum.io/downloads https://www.continuum.io/downloads [1] - http://jupyter.readthedocs.io/en/latest/install.html http://jupyter.readthedocs.io/en/latest/install.html [2] - https://www.codecademy.com/learn/python https://www.codecademy.com/learn/python [3] - https://www.amazon.com/Make-Your-Own-Neural-Network-ebook/dp/B01EER4Z4G https://www.amazon.com/Make-Your-Own-Neural-Network-ebook/dp... [4] - https://try.jupyter.org/ https://try.jupyter.org/
- analog31 10y agoYou didn't ask me, but I use the same tools in my work. If a scientist tells you they're using "Python," there's a good chance they're referring to this stack, possibly without knowing what's under the hood. I'm a scientist working at a private company that makes measurement equipment, and I use Python for practically everything now: Modeling, data analysis, and even talking to hardware. Our engineers have been kind enough to provide Python friendly interfaces to our hardware, so I can write things like test scripts that are used in product development and sometimes in manufacturing. I write similar scripts when I'm prototyping hardware myself. I write some stand-alone Python programs, when it becomes convenient to provide a GUI (via Tkinter). I also use Jupyter quite a lot for data analysis and exploratory work. Often, I use a stand-alone Python program to generate data, and a Jupyter notebook (with inline Matplotlib graphs) to analyze it. At another level of abstraction, I now use Jupyter as my lab notebook. Just last week, I completed a fairly extensive study that included development of a prototype, automated testing, and data analysis. When I was satisfied with my results, rather than writing a separate report, I simply added explanatory text to the Jupyter notebook, with some cell phone pictures for documentation. And then I scheduled a meeting to present my results. My presentation was a slideshow that was served up from the same Jupyter notebook using the nbconvert utility. Even though my work will never be revealed to the public, I have embraced the idea that "real science is open and reproducible," and am pushing towards an ideal state where a single file folder contains everything needed to reproduce my work, including hardware design, source code, experimental data, and so forth. I'm also learning to use git, so that this stuff can all be revision controlled. If someone asks me for help getting started with Python, I suggest that they should get Anaconda, or an alternative that I prefer called WinPython.
- e19293001 10y agoWhat resources or books you would like to recommend for data analysis?
- analog31 10y agoUnfortunately, I might be a bad person to answer that question. I'm 52, and have been programming since high school, not as a professional developer, but just using programming as a tool. So I learned data analysis long before learning Python, just through my general science education and work. The result is that I don't really know what a good modern tutorial is. The old timers would just hand you a copy of Numerical Recipes and wish you good luck. ;-)
- petters 10y agoThese days, I mostly use those tools for plotting and simple exploratory data analysis. I also do some modeling for integer programming.
- taeric 10y agoI've found that emacs + orgmode and liberal usage of sessions in code blocks superior to jupyter. That said, I don't see it taking off pretty much ever. :(
- Steeeve 10y ago> sessions in code blocks I was going to ask for a little more information about this, but a quick google search led me to plenty. This is eye opening. Thank you!
- taeric 10y agoGlad it was helpful. If you do anything cool with it, please share! I would love to be wrong on it taking off. :)
- CalChris 10y agoThey still teach Matlab at Berkeley as the intro course for (non CS) engineering students, E7. http://www.ce.berkeley.edu/~sanjay/e7/syl.pdf http://www.ce.berkeley.edu/~sanjay/e7/syl.pdf Then if you take an upper div class like EE120, Linear Systems, the homework sets will be in Matlab. We used it again in EE192, Mechatronics. Non engineering students (CS students) will have to pick it up immediately. I'd have preferred using Octave on my laptop rather than Matlab which was installed on Windows machines. Matlab is definitely used for non-CS engineering.
- kbumsik 10y agoWell Matlab is still a very popular among Engineers who are usualy more conservative than CS guys. And they are not convinced to switch to the other tools cuz Matlab is still good enough so it is not worth risking to loose their legacy codes as a consequence...
- domenukk 10y agoOctave user under 30 here. I picked up a Matlab project recently (pattern recognition, electrical engineering etc. heavily use it in my university). Because I wanted to run it on Amazon and didn't want to deal with all the licensing issues I ported it to Octave instead. Works like a charm (using it in https://camfinger.com https://camfinger.com ) and it's actually free like any normal interpreter would be. Personally I'm more used to other languages and would also tend to python, however I must admit Matlab/Octave is a pretty good way to develop matrix heavy stuff thanks to an extremely good REPL/debugger. That being said, Octave feels pretty slow for loops (lack of a proper jit), so I wouldn't know if I'd really use Octave over Matlab if it were not for licensing issues either. Then again I can rent a lot of cloud time for a Matlab license...
- analog31 10y ago>>> and it's actually free like any normal interpreter would be You are under 30. ;-)
- aidenn0 10y agoNo kidding; I remember the first time I found a C compiler for under $100; I felt like I hit the jackpot.
- 77pt77 10y agoOne of my first C compilers was only free without floating point support. I guess it was crippleware...
- lawnchair_larry 10y agoAnd now javascript is free without int support!
- 77pt77 10y agocripplefreeware
- whyever 10y agoI think it is still extremely popular among (mechanical and electrical) engineers. All physicists I know rather use the stacks you mentioned or ROOT.
- planteen 10y agoYes. Aerospace engineers also seem to love it and Simulink, especially in areas involving simulations and control theory.
- bigger_cheese 10y agoMy work (Industrial Plant) has a pretty good cross-section of engineering disciplines. I know Electrical guys use MatLab relatively frequently. I can't say for sure what the mechanical guys use I know 2 or 3 that write C code very proficiently. Chem eng. guys are pretty heavy on Fortran from what I have seen. I'm a Materials engineer never used Matlab. For numerical stuff I have personally used C/C++ especially GSL library but I rarely do this type of work any more. There is quite a lot of legacy stuff written in Fortan mostly heat transfer and fluid dynamics related. I try to avoid touching it. Commercial Packages like ANSYS get used a lot. I have seen python a little bit in last couple of years but not for numerical stuff more for interfacing with other libraries like OpenCV.
- 0xcde4c3db 10y agoI've drifted away from the field, but last I heard Matlab is still a really big deal in digital signal processing and modeling RF signals and systems. There are e.g. toolchains to start with Matlab code and end up with a synthesized filter in an FPGA. Octave can be used as a stand-in for Matlab when you need to fiddle with some Matlab code but don't necessarily need the full-blown infrastructure of Matlab's "toolboxes", or when you're just learning the fundamentals of programming in a Matlab style. NumPy can fundamentally do the same stuff at this level, but the syntax for basic manipulation of vectors/matrices is significantly clunkier. This isn't a big deal when implementing a known solution, but for little REPL sketches and experimentation it's definitely been noticeable to me.
- bandrami 10y agoFor control systems its toolkit is even better than Wolfram's, which is unusual.
- mcshicks 10y agoA lot of online engineering courses use Matlab, generally where there is more emphasis on learning the algorithm than the programming. Matlab a lot of different specialized toolboxes like DSP. I've taken several courses over the last few years and it seems like they are about 50/50 matlab or python. The very popular Machine Learning course on coursera specifically uses octave. Usually Matlab offers a short term license for anyone signed up for the course. I think the thing about Matlab is there is not that much to learn if you just want to do some computing and are not trying to create any sort of reusable program. Also it can be simpler to setup/install than say ipython and numpy (again for a classroom environment)
- evanpw 10y agoI've seen this use case: develop interactively using Matlab on a local machine, and then run a bunch of instances concurrently using Octave. You get the ergonomics of developing in Matlab, but you don't need hundreds of licenses.
- raverbashing 10y agoI'd say Octave is a more 'turn key' solution as compared to Python/R More limited in the programming sense but easier to do something punctual (and easier to install than the Python tools)
- CamperBob2 10y agoNo kidding. Especially for Windows users, just figuring out what version of Python is needed and getting it set up with all of the dependencies required by the application is daunting. What Matlab brings to the table is a customer-centric focus... meaning an awareness that the customer probably has something to do this week besides screwing around with open source scientific computing packages and their inevitable dozens of scattered dependencies. As for Octave, it's useful for absolute zero-budget applications at the very low end of the market, and for mass deployment of multiple instances at the high end, but it doesn't have much of a role in the middle. The "home use" licenses introduced by Matlab recently really dropped a bomb on Octave. You can get a ridiculous amount of nifty stuff for less than $500.
- Avshalom 10y ago...eh. I mean Mathworks might not be thaaat diligent but "For personal use only. Not for government, academic, research, commercial, or other organizational use" Like I mean what the hell does that leave for "personal use"?
- CamperBob2 10y agoI think it's more of a "Here, now you don't have to warez our stuff" kind of license. Technically the intent was for self-directed personal education. But the real reason is to encourage people to learn Matlab, and not Numpy or R or something else, and to discourage people from messing around with Octave. It's a classic move for a company that's getting worried about their market share. Given that most of the value of Matlab over Octave lies in its toolboxes -- which are now $45 each -- this strategy seems sound. A few packages still aren't available, such as the toolbox that does HDL code generation, but those aren't available in the FOSS world either.
- sampo 10y agoIn the Stanford/Coursera machine learning class, Andrew Ng said that his teaching experience is that students pick up octave/matlab quicker and the course can cover more actual machine learning, compared to python where more time is spent learning the language. So I guess for newcomers and for quick prototyping (just 10s or 100s lines of code), octave is nicer. Say, you have some numbers for a matrix and a vector in files and want to read them in and multiple the vector by the matrix. In octave you are done in 3 lines of code in 30 seconds. In python, you first figure which modules to import, the difference between python arrays and numpy arrays, and god forbid you happen to find the numpy matrix type instead of numpy array type. After 5 minutes you think you're all set to calculate the M * v, but then your vector happens to be a line vector and not a column vector and you need to learn the difference. Also it's nicer to write M * v than np.dot(M,v). Most of the features of python that I presented as cons are actually pros when the codebase is more than 1000 lines and needs structure and safety.
- rz2k 10y agoI took the EdX/MIT course[1] on optimization methods and constraint solvers using Julia and JuMP and it was really fun. Julia wasn't around, or it was very early, when he designed the Machine Learning course or was teaching Stanford students, and he's moved on since then. I wonder if he would likely choose Julia now. I like R, but understand that %*% for matrix multiplication, solve() instead of \, and the relatively cumbersome syntax for defining matrices indicate that it not designed primarily for users to interact with matrices at a lower, mechanical level. The xapply() functions can also be more confusing than picturing how you iterate through loops. Python too can be verbose for doing the simple/toy problems that are helpful when learning. Julia however comes with the easy Matlab/Octave syntax for handling matrices. But then there is a lot of of syntactic sugar too after you get past the early stages. Even things like the built-in support for intermixing Greek letters were surprisingly helpful. I think the advantage of Matlab is the toolboxes in engineering contexts, but that Julia has a similar learning curve for beginners working with matrices. Perhaps the Matlab IDE is an advantage, but that doesn't come with Octave, and Jupyter or Atom+Julia are relatively user-friendly. [1] https://www.edx.org/course/optimization-methods-business-analytics-mitx-15-053x# https://www.edx.org/course/optimization-methods-business-ana...!
- robert_tweed 10y agoI learned Octave from the Andrew Ng ML MOOC and since then, I like to use it occasionally as an advanced calculator. It's pretty handy to quickly run on the command line and play around with some ideas, but for anything that involves more than a throwaway script I'd most likely switch to a more "serious" language. What I will say is that I really enjoy using Octave, just because with a certain fairly narrow domain it's quick, powerful and there's no messing around with dependencies to get going. It's very immediate, which is exactly what I want from a calculator.
- yomritoyj 10y agoThere will always be a need to run legacy code. For example Dynare (http://www.dynare.org/ http://www.dynare.org/) is written in Matlab and has established itself as a standard tool for solving and estimating a certain type of macroeconomic model. The authors have been careful to ensure that it works with Octave as well, which I appreciate as someone working in an institution with a limited budget. I teach my own students Python, but as people entering the profession at this point, they should be able to use Dynare as well.
- tmalsburg2 10y agoTons of legacy code. I'm in academia and in some research areas Matlab is so deeply entrenched that it will take decades for Python or Julia to replace it. Not sure though whether all this code runs under Octave.
- 0xmohit 10y agoCurious: Doesn't anyone use Maple these days?
- GFK_of_xmaspast 10y agoI haven't used maple for many years, but unless something's changed it's not in the same domain as matlab/octave/numpy.
- santaclaus 10y agoNo joke, scientists from Canada. I'm a Mathemstica fan myself, but among scientists from Canada the Maple/Mathematica split seems roughly 50/50. I'm guessing it is popular in Canadian Univerisities.
- zem 10y agomaple plays more in Mathematica's niche than in matlab's.
- auxym 10y agoWhen I was in CEGEP (2 years of pre-university basic science and general ed college, specific to Quebec), we used maple for exploratory symbolic and plotting kind of work in math classes (calculus and lin alg). In university (engineering school) they taught us MATLAB in the two required introductory programming classes. In grad school I took an advanced numerical methods class where the prof was actually cool enough to let us use whatever language we wanted. I took the opportunity to learn python/numpy.
- LolWolf 10y agoI'm a huge fan of Python and I use it for everything (to put it mildly, I've spent weeks translating MATLAB code from other researchers into Python simply because I believe Python is far nicer to work with), but I must say that in my experience SciPy's numerical libraries are still fairly inferior to MATLAB's own (it may have to do with the $2000 price-tag). Even simple numerical root-finding and integration of one-dimensional PDEs is nowhere near the caliber of MATLAB's. Perhaps the most time-consuming thing I've found is that, to get NumPy/SciPy to work for some scenarios, you can spend your time tinkering around with a bunch of different parameters whereas the same functions work directly out-of-the-box on MATLAB. Rarely have I found the opposite to be the case, and I know this is the reason a few researchers I work with still don't use Python for their internal work. Perhaps I can cook up a few examples from my projects, just to make a fair comparison.
- leksak 10y agoIn short, scientific computing and simulations. Bear in mind that you'd have to rewrite both Matlab and GNU Octave if you need to run your simulations on a super computer. I remember back when I was a first year I was waist-deep in some Matlab when one of the guys at our high-performance computing center jested that if I wrote a for-loop I may just as well run around the building for each iteration and do the calculation with pen and paper. (context: members of the same computer club)
- CamperBob2 10y agoMatlab has some optional distributed features. You can farm it out to an EC2 instance among other things.
- kyogen 10y agoOctave can do this too [1,2]. The 'parallel' package is quite easy to set up and integrate. 'mpi' doesn't work with new octave versions (yet?). [1] http://octave.sourceforge.net/mpi/ http://octave.sourceforge.net/mpi/ [2] http://octave.sourceforge.net/parallel/ http://octave.sourceforge.net/parallel/
- gnufx 10y agoEven if you can find the money, I'm told by people who support Matlab on our systems that it isn't very effective and doesn't fit well with HPC resource management.
- gnufx 10y agoThe tendency to write Matlab that's several orders of magnitude slower than equivalent Fortran isn't the only reason to try to keep it off HPC systems. There are crazy (and inconsistent) licensing conditions applying to running on clusters for one.
- freyir 10y agoMathworks/Matlab is heavily entrenched in the engineering departments of most US universities. So students get free Matlab access in the computer labs and heavily discounted student versions (or pirated copies) on their personal computers. As a postdoc I attempted to push Python into the curriculum but professors are just much more comfortable with Matlab. I never met anyone who actually used Octave. Matlab's out-of-the-box IDE is good and makes debugging/profiling dead simple, the toolboxes cover a huge range of problem domains, and the language itself is easy to learn. But I've moved away from it due to the cost, licensing, closed source, etc. I use Python. I have an interest in Julia, but the language stability and ecosystem just aren't there yet.
- kxyvr 10y agoThere's an auxiliary reason to use Octave/MATLAB that most people don't talk about. Vastly cheaper access to high quality linear system solvers. Writing high-performing, multicore factorization codes is hard and only a few people do that well. For example, that's been most of Tim Davis' career. Anyway, codes like CHOLMOD are dual licensed GPL/commercial. If I want access to that solver, but I don't want to GPL my code, I can write a Octave/MATLAB routine that uses the `chol` command. Implicitly, this uses CHOLMOD on both Octave/MATLAB, but it's baked into the interpreter. Now, MATLAB has paid the appropriate license for access to the routine, whereas Octave just abides by the GPL. If I deliver a piece of code to a customer that needs this routine, I just tell them they need to use MATLAB because they provide the license cover. If my customer chooses to use Octave instead, that's not my choice. However, even if they do, GPL only kicks in if they externally deliver their code. It's this weird situation where I can legally deliver code because it's fine under the MATLAB license, but the end result will work under Octave, which can be used freely under GPL. Anyway, there are a huge number of solvers where this occurs. Something like Python is fine, but I'd be very careful with the licensing if anyone intends to distribute under a non GPL license since a large number of the good numerical libraries are dual licensed GPL/commercial.
- ramshorns 10y agoThat's an interesting effect of dual licensing, but I'm not sure I understand it right. If you write a routine that uses the `chol` command, that's not a derivative work of chol, is it? It's just a function call, which is a normal use. It seems like if you give someone this routine but don't give them CHOLMOD, they can use any implementation of that function signature they wish. But maybe since it's an oct-file (or I imagine a mex-file in MATLAB), it's baked into the interpreter and it's a different story.
- CPAhem 10y ago>Or put another way, why learn Octave/Matlab Because: 1. they are really simple and closer to math than programming languages 2. there is a huge codebase and many toolkits. 3. Matlab can be very fast
- derstander 10y agoAs an electrical engineer (focusing on signal processing), Matlab appears to me to be the overwhelmingly dominant tool in my discipline for prototyping algorithms and performing analyses. Recently, though, there has been a resurgence of interest in Python (with SciPy, NumPy, and Jupyter). I'm not sure if it outstrips IDL in popularity yet, let alone Matlab. For me, personally, I use Octave at home when prototyping algorithms because I'm cheap and haven't paid the ~$1k for a Matlab license. In my experience for real-time implementation, neither Matlab nor Python are considered efficient enough, even after using something like the Matlab compiler or Python's psyco or equivalent. Again, in my experience, C is by far the most popular choice. With regard to learning Octave and/or Matlab, I'd say people learn it because of inertia and that they're well-tuned for numerical analyses. I say this even though Python's my favorite general-purpose language. I still prefer Matlab/Octave over it for crunching data because, to me, they seem better designed for that purpose.
- mthirsch 10y ago> For me, personally, I use Octave at home when prototyping algorithms because I'm cheap and haven't paid the ~$1k for a Matlab license. FWIW, you can get a home copy of MATLAB for $149: https://www.mathworks.com/products/matlab-home/ https://www.mathworks.com/products/matlab-home/ > In my experience for real-time implementation, neither Matlab nor Python are considered efficient enough, even after using something like the Matlab compiler or Python's psyco or equivalent. Again, in my experience, C is by far the most popular choice. MATLAB Compiler won't make code any faster - it's still just running MATLAB engine underneath the hood. MATLAB Coder converts to C code optimized for real-time systems
- derstander 10y ago> FWIW, you can get a home copy of MATLAB for $149: https://www.mathworks.com/products/matlab-home/ https://www.mathworks.com/products/matlab-home/ Whoa, thanks for that link. IIRC quite awhile ago there was a student edition that wasn't really suitable for anything other than toy problems because there was a limitation in the size of matrices. This looks to be the real deal though! > MATLAB Compiler won't make code any faster - it's still just running MATLAB engine underneath the hood. MATLAB Coder converts to C code optimized for real-time systems My mistake: the particular toolboxes often fuse together in my head. Not such a big deal at work where we've got access to so many of them. It'd definitely be a pain if I didn't. My point still stands, though, that I haven't seen anyone on any of the projects I've worked on using MATLAB code that's been automatically converted to C. Or, at the very least, it's not part of any documented process that I've seen.