Vijay,
Hi! I apologize for the delay in my response, but as Ross mentioned I was out of the office last week.
You are correct that the definition of modulation depth appears to be different than the implementation in the example you found. However, under the hood, the example is returning correct results. Since the SubVIs are not password protected, you can dig into their block diagrams and take a look at exactly how they are implemented. You can also read a more formal definition of modulation depth by clicking
HERE.
While there are no examples for FM modulation depth that I can find, the coding will be very similar as for AM since the underlying principle (as discussed in the link above) is the same.
I hope that this is helpful to you!
Thanks,
Alan L
Applications Engineer
National Instruments