Hi! I'm hoping there's someone out there who would give me an idea on how to increase computation speed for the following code:
So what I'm trying to do is to get a bunch of different combinations of x,y,z from their respective Gaussian distributions for translation of a matrix doseDist (250x250x143), then a Gaussian filter is applied. Then with the resulting distribution, I compute something called TCP where the weighting of the Gaussian distribution is applied to get the expected value.
From the profiler, the bottleneck is in the imtranslate and imgaussfilt3 functions which I don't think they can be further optimised - basically left with getting rid of the nested for loops.
Any help would be appreciated!