I want to integrate programming into my learning in math and science in a very specific way. I want to create visualizations and simulations of concepts I am learning. When I learn a numerical method of graphing differential equations I want write a program that can do it for me, when I learn about tunnelling in QM I want to be able to animate it (maybe even write something that can solve a misc. set of potentials), when I learn about coupled oscillators I want to be able to write a program that animates pendulums connected by springs, etc. I also want all these animations to not depend on a built in physics engine. I want the equations inputed by me. Is MATLAB capable of all this? If not, what is?

Here are some example from other people:




I understand some of the above use matplotlib with python. I have tried using it but have run into problems that just dont arise in trying to learn Matlab. Even when I copy/paste code into Jupyter notebooks, things fail to run or animate. I don't know how to interpret the error messages and there are simply not enough resources online to figure it out. Maybe I need to be told that its not too hard and I am lazy. I respect that. I am good at and enjoy math and physics. I have only been remotely interested in programming for a couple of days. So, be harsh but be understanding.

  • 2
    $\begingroup$ I am a long time MATLAB user and quite proficient at it -actually it is my goto language for prototyping- but learning scipy/numpy libraries is the future facing way. But if you want to stick with MATLAB (and I can suggest it, MATLAB has everything you need), you can use GNU/Octave. It has same syntax, lacks some features but it is open source. Julia is also high level/high performance programming language, it became popular two years ago and its user base is constantly growing. This is my two cents $\endgroup$ – Abdullah Ali Sivas Mar 6 at 5:20
  • $\begingroup$ If you have access to Matlab, then it is a good tool for what you want to do. But if you need a free tool, try Python (my preference) or Julia. One great reason to use Matlab for me is the excellent Chebfun software chebfun.org which is also useful for what you want to do. $\endgroup$ – cfdlab Mar 15 at 4:56

I think your approach is very good. Several studies show that doing something stays deeper in memory than reading about it and testing things for yourself will give you a good intuitive feeling. Now, to your questions:

Is MATLAB capable of all this? Yes, it has strong numerical and GUI capabilities

If not, what is? As mentioned by Abdullah Ali Sivas, you could either try Octave or Julia. I would add Scilab (Similar to Matlab and Octave but slightly different syntax, I like it because it has a simulator for block diagrams) and last but not least Python. I don't use Jupyter notebooks that much, for me they're more useful when documenting or presenting something. I would recommend you to install Anaconda which comes with the GUI Spyder (which you'll find familiar if you already know Matlab) and write code there. If you have problems re-running some code then googling the error message or asking in stack exchange is usually very helpful. And learning programming is absolutely a must, at the beginning perhaps a steep learning curve but totally worth it. There is a lot of free good information, so learning Python for a couple of weeks is a very wise investment.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.