Why is this Julia code considerably slower than Matlab

well for the sin cos performance ,it was discussed already in this thread pointing out to
better implementations.

I wanted to show the simplicity of converting code and the improvement using dot calls