MATLAB: How to improve the speed of the following matrix multiplication

MATLABmatrixmatrix multiplication

My problem is doing the following calculation. Suppose the size of the matrix is as follows:
Mat A: [100 X 500]
Mat B: [500 X 1]
Mat C: [500 X 200]
All matrices are not sparse. What I want to calculate is
for i = 1:n
D = A*(B.*C)
end
Here, (B.*C) creates a matrix having a size of [500 X 200]. The problem is elements of the Mat B are changed in every loop whereas Mat A and C have constant elements. I think the cpu time for this calculation can be drastically reduced by calculating Mat A and C outside of the for-loop first. (Now, a matrix multiplication between Mat A, B, C is done in every loop again and again even though Mat A and C are matrices having constant elements.) But I don't know what I should do.. Can you please help me?
The Matlab code is
A = rand(100, 500);
C = rand(500, 200);
n = 1000;
for i = 1:n
B = rand(500, 1);
D(:,:,i) = A*(B.*C);
end

Best Answer

AC = reshape(reshape(A,size(A,1),1,[]).*reshape(C.',1,size(C,2)[]),[],size(B,1));
for i = 1:n
reshape(AC*B,size(A,1),[]); % = A*(B.*C)
end