Home » All Programs » Digamma Function In MatLab®

Digamma Function In MatLab®

Digamma function is defined as the logarithmic derivative of the gamma function. You can find more detailed information about the digamma function from this link. 

YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!

Matlab® provides a very simple and useful command which is the ‘psi()’ command. Here we explain how to use the ‘psi()’ command in Matlab® to calculate the digamma functions. The example below is executed in Matlab® command window. So, you can try it in your own Matlab product. 

How To Use The ‘psi()’ Command In MatLab®?

>> psi(10)

ans =

    2.2518

>> 

As you see above, the ‘psi()’ command is very simple-to-use. You just need to type the value that you want to calculate its digamma function, inside the brackets of the ‘psi()’ command. Hit the ‘Enter’ key from your keyboard to see the result in the command window as above. 

What Is The Digamma Function?

The equation of the digamma function is like the above. The value that you typed inside the brackets of the ‘psi()’ command is the ‘x’ in the equation above. 

Conclusion

As you see that the use of the ‘psi()’ command to calculate the digamma functions is very simple in Matlab®. You can also type matrices or vectors inside the ‘psi()’ command. 

Do not forget to leave your comments and questions below about the use of base conversion commands in Matlab® below. 

If you want further coding examples about ‘sym’ and ‘syms’ commands in Matlab®, inform us in the comments.

This article is prepared for completely educative and informative purposes. Images used courtesy of Matlab®

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


Please

leave feedback ?

( For the post )

ASK THE MECHANICALLAND

COMMUNITY


We are always open to your feedback to improve ourselves and the quality of our content! If you have any suggestions, thoughts, or criticism, please let us know. We are trying to improve our blog with constructive feedback. We are aware of how valuable your feedback is for our future development, and we will carefully read all your comments. Thank you in advance!