Need ideas on how to optimize this code.
Informazioni
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
Mostra commenti meno recenti
my two files are located in the same paste:
optimal starting values are:
rows=100
cols=100
days=100
daysimmune=5
p=.4
in=2
axes1 and axes2 are figure/subplot handles
anything higher and the graphing slows down, with these settings you can see an example of a virus spreading through a population of rows*cols (edges ommited, they always remain at value 0 for simplification)
Looking for anyway possible to optimize these processor heavy loops, without screwing anything up, thanks for any help in advance!
1 Commento
Did you profile this code? If not, execute the following in the command window, after having defined all input parameters of sim_virus:
profile viewer
Then type the call in the field on the right of Run this code:
sim_virus(rows,cols,days,daysimmune,p,in,axes1,axes2)
and click on [Start profiling]. You will have the full profile of your function, which show what part(s) to work on in priority.
Risposte (0)
Questa domanda è chiusa.
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!