Matlab® provides very useful tools to calculate different mathematical operations. One of them is for the calculation of the polygamma functions. ‘Polygamma functions’ is a very important aspect of advanced mathematics. You can find detailed information about the polygamma functions from this link.
MATLAB syntax is quite peculiar compared to other programming languages. We can return one or more values from a function. We can also pass one or more arguments/variables while calling a function. MATLAB functions must be defined in separate files and function name must match with the file name. ‘Polygamma functions’ is a very important aspect of advanced mathematics. You can find detailed information about the polygamma functions from this link. YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®! Polygamma functions are calculated with the ‘psi’ command in Matlab®. Inline Functions One downside to Matlab functions in m-files is the proliferation of files resulting from having each function in it’s own file For simple functions, this can be avoided with an inline function.
YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!
Define a MATLAB Function: The Syntax. Here is the simplest way to define a MATLAB function: function out = functionName ( in) instructions end. In this example, you have one input and one output for the function. To define a function, you basically have to write the keyword function, then your outputs, the symbol “=” followed by the name of. MATLAB Function Reference: dir. Display directory listing. Graphical Interface. As an alternative to the dir function, use the Current Directory browser.
Polygamma functions are calculated with the ‘psi()’ command in Matlab®. Here we explained how to calculate polygamma functions in Matlab® with the ‘psi()’ command. You can try this command in your Matlab® software.
How To Use The ‘psi()’ Command In MatLab®?
As you see in the programming example above, you need to enter two inputs inside the ‘psi()’ command in Matlab® to calculate the polygamma function. The only requirement is that the first term must be bigger than 4.
The general expression of the polygamma function is like the above. The first term that you entering inside the brackets is the ‘m’ above. And the second term is the ‘z’. Polygamma function is calculated with these values in Matlab®.
Conclusion
As you understand that the calculation of the polygamma functions in Matlab® is very simple with the ‘psi()’ command.
Do not forget to leave your comments and questions below about the use of the ‘psi()’ command in Matlab® below.
Matlab Function File
If you want further coding examples about the ‘psi()’ command in Matlab®, inform us in the comments.
Matlab Function File
This article is prepared for completely educative and informative purposes. Images used courtesy of Matlab®