I would love to know why this code is not working. if anyone has any information on what is causing matlab to find so many errors, it would be greatly appreciated.
m = 1;
c = 1.5;
fun =@(x, epsilon) 1 .* (1 - (1 - cos(x))/(2.*epsilon)).^c .* cos(m.*x);
a = @(ep) acos(1-(2*ep));
lm =@(e) 1/(2.*pi) .* integral(@(x)fun(x, e), -1.*a(e), a(e));
fprintf('ball bearing at 0.6 is %4.4f', lm(0.6));
the function that I am trying to replicate is 𝐼𝑚(𝜀) =1/2𝜋∫[1 − (1 − cos(𝑥))/2𝜀]^𝑐 cos(𝑚𝑥)dx
There should be no need for the dot modifier on the multiplication to my knowledge, however Matlab was complaining that this required element-wise operations even though there are no matrices involved.
ball bearing at 0.6 is 0.2416.