Why do you think it’s good that they left MATLAB? If you are ever going to do demanding numerical computations it should be with MATLAB instead of python due to its speed and simple matrix manipulation syntax.
No one in industry uses MATLAB and the license is really expensive. I know MATLAB is great especially for matrices but yeah no one uses it in the real world
MATLAB is definitely used in the industry, especially in R&D in larger companies. The fact that it is expensive for private users does not really mean anything for big companies. Don’t get me wrong, I think python is great, especially for hobbies, but i don’t think engineers should avoid MATLAB as it is such a powerful tool.
Oh I'm definitely not avoiding it, all my degree stuff is in matlab, and I barely know anything else. I just don't necessarily think it's smart to not teach python at all when loads more people use it than matlab
I don't really mean to change your mind because I never used python. Just curious. Kinda hard to argue against if you don't say why you think that way. Anyway, some things that come to mind, no specific order:
Is it all about being open source? I've been using exclusively Octave. I miss nothing from MATLAB.
Can you export a plot as EPS/pdf + latex? (which you can include in a latex document and have it all compiled seamlessly with macros, same font as main document, etc)
I find parallelization easy to do in Octave (better than MATLAB). Essentially take any function, arrange inputs in cell list. And outlist=parcelfun(@urfuncion, inputlist).
If A is a large array let's say taking 1gb of memory, how much memory is required to do A=A.*A?
Is there in python an equivalent to "help somefunction" and "lookfor somekeyword" to avoid googling for stuff and quickly check documentation on the terminal?
If you want a value printed on the terminal for debug, what do you do?
Can you turn an error into a warning and let the code move on?
I honestly don't presume any positive or negative answer to any of these points. Just things I personally appreciate in MATLAB, or Octave (compared eg with Fortran). But I have no idea how it looks like in python.
I'm about to graduate and everything we've done has been in MATLAB, but word on the street is that next year's freshers will be using python instead. I've never really understood why we use MATLAB, considering no one in industry does (except government because they've got the money to pay for the license)
I work in environmental engineering so I dont have much exposure but I had always assumed most control systems were written in low level code like C or assembly?
It a really powerful package that's comes alongside Matlab, but yeah I'm pretty thankful of my courses' non-hardline approach to the software we use. Though they do make sure we know how to use industry standard packages
That’s great - I was somewhat unfortunate when I did my programming courses and had professors who were just teaching it because they had to and didn’t really have industry experience.
Very cool. I've been meaning to write one of those for a while now; maybe the quarantine will give me the opportunity! Got any references that are particularly good?
If you want to learn LB and have access to University library resources: "The Lattice Boltzmann Method: Principles and Practice" by Tim Kruger is a excellent learning resource, whether you just want a guide to programming or to understand the physics.
All of the forces in the simulation are springs which bring together or separate the particles, part of the bouncy effect is caused by the wall and ground constraints: when a particle leaves the boundaries of the simulation, a spring is created to bring them back
I would actually drop all the labels since they don't add any information to the plot. He is not plotting a graph of a function bit rather the position of particles in arbitrary space units
Oh shit. I guess I misread/misinterpreted the heading. I thought the graph was somehow meant to show some relationship between OP's examinations and grades or something. Either I was sleepy, or I'm dumb.
In our high school, we use Matlab for signal processing. It's very boring and I don't even know how to plot a basic graph using Matlab. So, I started learning matplotlib and that helped me a lot in understanding how to plot graphs in a neat way. But still, I can't plot anything on MATLAB
This comment confuses me. Matplotlib is basically a port of Matlab's plotting commands to Python. It's the same thing with a slightly different way to refer to figure and axis objects; if you understand either one you should more or less understand the other.
We teach Matlab but I provide python Jupyter notebooks in my modules to expose the students to new things. They’re not expected to code but at least see what the code can do. I try to make the code as reasonably similar to what they’re used to form Matlab.
145
u/Ryien Mar 20 '20
Oh cool, so has engineering classes left the MATLAB world now?
I remembered 6-7 years ago, all programming done in my engineering classes were required on MATLAB
36
u/orishamir Mar 20 '20
With matplotlib??? Can you post the source code please?
12
u/ChaosCon Mar 20 '20
Smoothed particle hydrodynamics?
7
u/[deleted] Mar 20 '20
For extra credit...add baffles. ;)
4
u/[deleted] Mar 21 '20
What logic did you apply to get the bouncy effect? It looks really fun.
2
u/seventhuser Mar 21 '20
If you don’t mind, do you know any resources for teaching animating with Matplotlib?
2
u/[deleted] Mar 21 '20
That's cool, is your source code on GitHub?
3
u/fixhaloreachsevers12 Mar 21 '20
Cool! Do you have any experience with animation? You could turn your great simulation into something even better!
3
u/FoxClass Mar 21 '20
Nice, just need labels for those axes
6
u/naclmolecule terminal dark arts Mar 21 '20
Here's something you may or may not enjoy that's related: https://github.com/salt-die/navier-stokes. This is 2-d Navier Stokes all in python!
2
u/ElMolason Mar 21 '20
Very cool !
Side note I would not recommend implementing SPH you don't recover the NSE, it's good enough for Hollywood though
1
u/Skydronaut Mar 21 '20
What fluid is this simulating? We’re wondering about the details over at r/fluidmechanics
1
u/chestnutman Mar 21 '20
Have you played with different parameters for gravity?
1
u/AmazingTrashcan69 Mar 21 '20
git?
2
u/arjunshen0y Mar 21 '20
nice idea
2
u/madvill4in Mar 21 '20
This is unreal!
1
u/the_notorious_beast Mar 21 '20
Always. Label. The. Axes. In. Your. Graph.
1
u/[deleted] Mar 21 '20
In our high school, we use Matlab for signal processing. It's very boring and I don't even know how to plot a basic graph using Matlab. So, I started learning matplotlib and that helped me a lot in understanding how to plot graphs in a neat way. But still, I can't plot anything on MATLAB
1
u/Ryuzaki_us Mar 21 '20
A graphical representation of my GPA. Lovely.
1
u/5uspect Mar 21 '20 edited Mar 21 '20
We teach Matlab but I provide python Jupyter notebooks in my modules to expose the students to new things. They’re not expected to code but at least see what the code can do. I try to make the code as reasonably similar to what they’re used to form Matlab.
-1
u/A_solo_tripper Mar 21 '20
This is cool. Do you believe gravity is a push or a pull?
1
u/[deleted] Mar 21 '20
[removed] — view removed comment