Skip to main content

On the performance of Matlab and Parallel Computing


MATLAB is one of the most powerful scientific computing tools along with Python. Although Python is my favorite scientific programming language since it is opensource, well-documented and has plenty of libraries, I sometimes use MATLAB especially while dealing with very large matrices as MATLAB is highly optimized for large-scale matrix operations, consequently, it performs better at processing very large matrices.


From a parallel computing perspective, MATLAB actually strives to utilize all available CPU cores in a parallel way to maximize its performance and reduce the computation time when it is possible. Therefore, it does a kind of parallel computing when it is possible such as in matrix operations as these operations are very suitable to be run parallelly.  However, the parallel operation of the MATLAB might be restricted by bad coding practice of the users especially using for or while loops, because those loops are generally performed in a serial manner with an increasing or decreasing index.  Of course, MATLAB has advanced parallel processing libraries for more detailed operations, however, the best way to shorten the computing time and improve the performance of the calculation is avoiding implementing loops. For example, instead of performing K times MxN matrix multiplications in a loop, simply one KxMxN matrix (K, M, N are big numbers) multiplication would be enough, then the result matrix could be sliced if necessary for further operations. This would shorten the computation time by a great amount (10 times or more depending on the matrix size and operation) as this operation could be performed parallelly by Matlab using its core libraries.


Popular posts from this blog

Most Popular and Best Video Games in 2021

The video game industry is one of the biggest virtual industries in the world. Almost half of the world's population is regularly playing games to relieve the stress in their lives. As a result, the importance of the gaming industry is increasing every passing year. Thus, we wanted to compile the most popular video games in 2021 for you! Do not miss your chance to check out the following games to give them a try. These games have been chosen by our editor and we are sure that you will enjoy playing them. Computer games are played by everyone ! These are the best video games in 2021 according to our game editor, please keep reading for the details of each game. Call of Duty: Modern Warfare FIFA 2021 Fortnite New World Apex Legends Top 5 - Most Popular Video Games in 2021 Here are the top 5 most popular video games that managed to be highly popular in 2021. We bet you have played some of these amazing games before! 1. Call of Duty: Modern Warfare Call of Duty is one of the most popul

Electromagnetic Modelling and Antenna Simulation via Opensource Software

Commercial electromagnetic simulation (EM) software packages such as CST Microwave Studio and  ANSYS HFSS are widely used in commercial applications and educational purposes. Based on my experience, they provide very accurate results which match measurements in most antenna works. On the other hand, there are also very solid opensource software and applications which may also provide similar results in some applications. Antennas are also used in radio telescopes While commercial EM software suits usually have very good documentations, easy-to-use interference, and result visualisation and navigation tools, opensource EM software suits might consist of only the solver and documentation which explains how it should be used and implemented for design and simulation via an interference and a programming language such as Python, MATLAB, C++ . As they are opensource, it is also possible to edit their codes and advance their functions and performance. Thus, these features makes opensource

15 Best IoT Energy Startups

15 Best IoT Energy Startups Energy is one of the common problems all around the world. Without it, all our technology will be useless. The interesting thing about energy is despite we have numerous sustainable and renewable energy sources; we still rely on scarce sources. Renewable energy is important because it provides a clean, sustainable and unlimited source of energy that can reduce our dependence on finite and polluting fossil fuels, helping to mitigate the impacts of climate change. Additionally, renewable energy can lead to local economic development, improve energy security and reliability, and create new jobs and industries. Wind power is one of the most important renewable energy sources.  On the other hand, the Internet of Things will change the trends in the energy industry as well. In fact, the number of IoT energy startups is worth mentioning. If you are interested in this field and love the idea of taking advantage of new technologies, then you need to know the followin