MATLAB PARALLEL COMPUTING TOOLBOX - S User's Guide Page 23

  • Download
  • Add to my manuals
  • Print
  • Page
    / 656
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 22
Introduction to Parallel Solutions
1-9
batch runs your code on a local worker or a cluster worker, but does not require a
parallel pool.
You can use batch to run either scripts or functions. For more details, see the batch
reference page.
Run a Batch Parallel Loop
You can combine the abilities to offload a job and run a parallel loop. In the previous two
examples, you modified a for-loop to make a parfor-loop, and you submitted a script
with a for-loop as a batch job. This example combines the two to create a batch parfor-
loop.
1
Open your script in the MATLAB Editor:
edit mywave
2
Modify the script so that the for statement is a parfor statement:
parfor i = 1:1024
A(i) = sin(i*2*pi/1024);
end
3
Save the file and close the Editor.
4
Run the script in MATLAB with the batch command as before, but indicate that the
script should use a parallel pool for the loop:
job = batch('mywave','Pool',3)
This command specifies that three workers (in addition to the one running the batch
script) are to evaluate the loop iterations. Therefore, this example uses a total of four
local workers, including the one worker running the batch script. Altogether, there
are five MATLAB sessions involved, as shown in the following diagram.
Page view 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 655 656

Comments to this Manuals

No comments

Avanti 392PST Handbücher

Bedienungsanleitungen und Benutzerhandbücher für Kühlschränke Avanti 392PST.
Wir stellen 1 PDF-Handbücher Avanti 392PST zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung Bedienungsanleitung






Weitere Produkte und Handbücher für Kühlschränke Avanti

Modelle Dokumententyp
WC52SS Bedienungsanleitung   Avanti WC52SS User Manual, 20 Seiten
WCR682SS-1 Bedienungsanleitung   Avanti WCR682SS-1 User Manual, 20 Seiten
FF1061W Bedienungsanleitung    Avanti FF1061W User Manual, 22 Seiten
RM3420W Bedienungsanleitung   Avanti RM3420W User Manual, 16 Seiten
EWC18DZ Bedienungsanleitung   Avanti EWC18DZ User Manual, 16 Seiten
INSTRUCTION MANUAL CK302R Bedienungsanleitung   Avanti INSTRUCTION MANUAL CK302R User Manual, 24 Seiten
CK36-1 Bedienungsanleitung   Avanti CK36-1 User Manual, 24 Seiten
FF882PSS Bedienungsanleitung   Avanti FF882PSS User Manual, 22 Seiten
WC 40D Bedienungsanleitung   Avanti WC 40D User Manual, 18 Seiten
RM3152W Bedienungsanleitung   Avanti RM3152W User Manual, 16 Seiten
WCR9000S Bedienungsanleitung   Avanti WCR9000S User Manual, 20 Seiten
FF1213PS Bedienungsanleitung   Avanti FF1213PS User Manual, 20 Seiten
RM4551B-2 Bedienungsanleitung   Avanti RM4551B-2 User Manual, 20 Seiten
BCA4561B-2 Bedienungsanleitung   Avanti BCA4561B-2 User Manual, 16 Seiten
VINERA EWC1201 Bedienungsanleitung   Avanti VINERA EWC1201 User Manual, 16 Seiten
SHP2403B Bedienungsanleitung   Avanti SHP2403B User Manual, 16 Seiten
WC681BG-2 Bedienungsanleitung   Avanti WC681BG-2 User Manual, 24 Seiten
RA317WT Bedienungsanleitung   Avanti RA317WT User Manual, 20 Seiten
EWC2410DZ Bedienungsanleitung   Avanti EWC2410DZ User Manual, 20 Seiten
FF992PS Bedienungsanleitung   Avanti FF992PS User Manual, 22 Seiten