MATLAB: Element multiplication and subtraction

element multiplication

I'd like to run the following though I keep getting element multiplication/division errors:
Ron = 0.012;
RL = 0.003;
R = 6.667;
D = 0:0.001:.999;
M = (D/(1-D))*(1/( (2*Ron*D/(R*((1-D)^2)))+1+(RL/R)*(1/((1-D)^2)) ))
plot (D,M);
I've several permutations of placing dots in front of multiplication, division and raise to the power signs though I just cannot seem to get this to work.
How should "M" be written so that Matlab will accept it?
Thank you

Best Answer

This line below avoids error but that doesn't mean it does what it is intended to do.
%(D/(1-D))*(1 /( (2*Ron*D/(R*((1-D) ^2)))+1+(RL/R)*(1 /((1-D) ^2)) )) %old version
M = (D/(1-D))*(1./( (2*Ron*D/(R*((1-D).^2)))+1+(RL/R)*(1./((1-D).^2)) )) %new version
% _ _ _ _ %underline differences
James Tursa's solution is also error-free (copied below) but produces totally different results.
M2 = (D./(1-D)).*(1./( (2.*Ron.*D./(R.*((1-D).^2)))+1+(RL./R).*(1./((1-D).^2)) ))
isequal(M,M2)
%ans =
% logical
% 0
This is why it's critical to understand what the equation is supposed to do. I haven't put much time into making sense of it so maybe James' version is the correct version or maybe neither answers are correct.