Question

7. Create an anonymous function that calculates the distance between two points A and B represented by polar coordinates as shown in the following figure. From trigonometry the distance d can be found by: (1pt) d=\sqrt{r_{A}^{2}+r_{B}^{2}-2 r_{A} r_{B} \cos \left(\theta_{A}-\theta_{B}\right)}

Fig: 1

Fig: 2

Fig: 3