A loop is not necessary.
If you have R2016b or later, try this (using your own variable vectors):
t = linspace(0, 2, 750);
a = 1:10;
f = linspace(1000, 2000, numel(a));
th = linspace(-pi, pi, numel(a));
y = sum(a(:).*sin(2*pi*f(:)*t + th(:)));
figure
plot(t, y)
grid
This uses automatic implicit expansion, introduced in R2016b. If you have an earlier version:
y = sum(bsxfun(@times, a(:), sin(2*pi*f(:)*t + th(:))));
produces the same result.
.