Parallel coding in matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
I am writting a code that In this code I have 8 independant equations which each equation is a second order equation that should be solved using Runge-Kutta 4th order method. But I need to solve them paralerly.
Do you know how can I do this work?
2 Kommentare
Bjorn Gustavsson
am 13 Jan. 2023
Why do you need to solve them parallely if they are independent? If they are independent shouldn't their solutions be possible to calculate one after the other, and then you can put them together without any-one knowing the difference?
Antworten (1)
Walter Roberson
am 13 Jan. 2023
In your r2019b release you would need the Parallel Computing Toolbox and use parfor or parfeval or spmd
With sufficiently new MATLAB versions there is a new built-in background pool that can execute parfeval without needing any additional toolbox.
Note that depending on the details of what is being calculated and on the memory patterns, there are cases where calculations in parallel will be slower than calculating sequentially.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!