MATLAB: Help me with dots location

correctdotsdots locationequations

I have no idea how to add dots to this equations. ab is matrix, er1 and er2 are variables. Please help me :3 CODE:
ab=(0.01:0.01:10);
er1=2.05;
er2=4;
Z01=60*log(ab)*sqrt((log(0.5*ab)+log(0.5))/log(ab));
Z02=60*log(ab)*sqrt((er1*log(0.5*ab)+log(0.5))/(er1*log(ab)));
Z03=60*log(ab)*sqrt((er2*log(0.5*ab)+log(0.5))/(er2*log(ab)));

Best Answer

I assume you intend ‘add dots’ to create element-wise operators:
ab=(0.01:0.01:10);
er1=2.05;
er2=4;
Z01=60*log(ab).*sqrt((log(0.5*ab)+log(0.5))./log(ab));
Z02=60*log(ab).*sqrt((er1*log(0.5*ab)+log(0.5))./(er1*log(ab)));
Z03=60*log(ab).*sqrt((er2*log(0.5*ab)+log(0.5))./(er2*log(ab)));
Here I substituted ‘.*’ for ‘*’ and ‘./’ for ‘/’, that I assume is what you want to do. See the documentation for Array vs. Matrix Operations for details.