Contenuto principale

Elaborazione in background e in parallelo

Eseguire il codice in background o in un momento specifico

MATLAB® include funzionalità per impostare i timer per l'esecuzione del programma ed eseguire il codice in background.

Funzioni

espandi tutto

timerSchedule execution of MATLAB commands
deleteDelete files or objects
isvalidDetermine valid handles
startStart timer
startatSchedule timer to fire at specified time
stopStop timer
timerfindFind timer objects
timerfindallFind all timer objects
waitBlock command prompt until timer stops running

Esecuzione in background

parfevalRun function in background (Da R2021b)
parfevalOnAllRun function on all workers in background
backgroundPoolEnvironment for running code in the background (Da R2021b)

Futures

fetchOutputsRetrieve results from function running in the background
afterEachRun function after each function finishes running in the background
afterAllRun function after all functions finish running in the background
cancelStop function running in the background
cancelAllStop all functions running in the background (Da R2022a)
waitWait for futures to complete
fetchNextRetrieve next unread outputs from Future array
FutureFunction scheduled to run

Code di dati

sendSend data to DataQueue or PollableDataQueue
pollRetrieve data from PollableDataQueue
closeClose pollable data queue (Da R2025a)
afterEachRun function after data is received on DataQueue
parallel.pool.DataQueueSend and automatically process data
parallel.pool.PollableDataQueueSend and manually retrieve data
parallel.pool.ConstantCopy or create data only once on workers in parallel pool (Da R2021b)