What is your purpose of vectorizing the code? The processing time is dominated by imagesc and pause here. I assume the loop are faster than the vectorizde code, which produces large intermediate arrays. Your original loop takes 0.86 seconds, the code in the comment above 1.33 seconds, if imagesc and pause are removed.
You can add an additional dimension:
dim = [1, size(tt_hat)];
p = H((0:dt:T).' - reshape(tt_hat, dim)) ./ reshape(sqrt(d3), dim);
p1 = sum(p, 4).^2;
But I do not see the advantage compared to clean loops.
If efficiency matters, remember that anonymous functions are expensive. So reduce them to the minimum:
H = @(x) exp(-x.^2 * BW^2) .* sin(2 * pi * fc * x);
Note: Please format your code in the forum to improve the readability. I've done this for you today.
The brute clearing header "clc;close all;clear all;" is extremly inefficient: the clear('all') removes all functions from the memory and forces Matlab to reload them from the slow disk. This wastes a lot of time and offers no advantage. Prefer using functions instead to keep your workspace clean.