- Joined
- Dec 18, 2019
- Messages
- 6,477
As an FYI, I recommend the Scipy and Numpy libraries, as well as Matplotlib, which are accessible via Python. Together, they give you amazing computational ability rivaling and surpassing MatLab in many areas (not all). Numpy and Scipy work on arrays and matrices. They are optimized libraries, so their results are almost as fast as running it in C++, but the development time is far far less.Since you did programing a long time ago, you probably will get back in the groove pretty easy. @WobblyHand has great comments and suggestions but let me add one. I grew up on Fortran several decades ago. Then went through to several other languages which all become obsolete! Python is great and FreeCAD is based upon it, but incorporates lots of compiled C code which you never have to look at. This maybe what makes it so fast as an non compiled language. However, learning Python is a little tricky and installing it on your computer can be difficult. This is largely because it has sooo very many features (packages) for different applications that if you did and could install them all you would be at it for a long time and fill up your hard drive.
So I used MatLab for quite a while and got pretty good with it. Unfortunately, its availability is limited unless you have $$$ or access via some other employer or educational institution. Since it costs and is well supported, it is well written with lots of features and lots of explanation/help files. However, you can access it on line for about 20 hours a month for free. Learning a little MatLab first, with its help files, is a tool and will take you a long way in learning Python, where the support is based upon user groups and is there, but just not as handy and easy to use as MatLab. https://www.mathworks.com/products/matlab-online/matlab-online-versions.html . I had a complex spread sheet which I had written and wanted to do it more mathematically. I wrote it is MatLab and then again in Python and found that the Python code process was very similar to Matlab, but took more lines of code as MatLab just had more built-in functions.
When you are ready to install Python, look to Anaconda (Conda). This is a free shell (window) that will install Python pretty much automatically for you and then provide a window to using python. It makes it a little higher level programing than Python. https://www.anaconda.com/download . After it is installed you can run python outside of the shell if you want to.
Anyway, using Anaconda will make your install process for Python much easer .... as you do not have to ask the question which of all the python packages do I need to install. It is all automated for the starter ... and then later you can add more and more features if you even need them.
Anyway, maybe these steps will help you restart.
Dave L.
PS. I am thinking about rebuilding my OS one of these days... and if I do this is how I will install Python. Yes, FreeCAD uses Python so having it installed first should help ease the FreeCAD install.
I was driven to learn about all this when put between a rock and a hard place at work. No budget, terrible and slow purchasing department, and an unyielding schedule. Within a year of use of Python, I basically stopped using Matlab. I've used Python/Scipy/Numpy and Pandas for scientific and engineering work for well over 15 years. I still use it now. Matplotlib generates plots just like Matlab, the beginner mode uses nearly the identical syntax as Matlab.
plot(x, y, 'b') gives you a plot of y vs x in the color blue, just like matlab.
I used all of the above recently to analyze the relative sound signatures of airguns. Read in a list of wav files, grabbed the data, did sophisticated peak finding using a scipy library, automatically time aligned and sliced the acoustic waveforms, windowed and fourier transformed the array of waveforms to look at their spectral content, and plotted all the smoothed data on a common graph. All that coding was done in a half day. Python makes it easy to code quite fast. It's a powerful tool and is free to use, whenever you want, and for as many hours as you want.
Anaconda is a good product - it makes Python easier to use and manage. Have used it before. Once I transitioned to Linux, I found that I didn't need it as much. If on Windows, Anaconda makes things a lot, lot easier.
I'm a huge Python fan. On a small memory limited platform, like a micro controller, with real time requirements, C and C++ are better suited to the task.