How can i run multiple codes simultaneously using parallel computing facility in local machine

Réponses (1)

Check the below example:
funcs = {@exp,@sin} ;
args = {2,pi/4} ;
sols = cell(1,2) ;
parfor n = 1:2
sols{n}=funcs{n}(args{n});
end
M = sols{1} ; N = sols{2} ;

Catégories

Rouvert :

le 6 Jan 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by