As we stated in another article about Matlab®; Matlab® provides various kinds of solutions for mathematical equation management. These tools save tremendous time to obtain the desired form of equations.
Here, we explain how to obtain fraction forms of symbolic equations in MatLab® by using the ‘numden()’ command. Take a look at the code example below that is executed in the command window of Matlab®, to understand the syntax and use of the ‘numden()’ command.
How To Use ‘numden()’ Command In MatLab®?
>> syms a y = a-3 + (3/(a-1)) - (2/(a+9)); [nominator, denominator]=numden(y) nominator = a^3 + 5*a^2 - 32*a + 56 denominator = (a - 1)*(a + 9) >>
First of all, we created a symbolic variable ‘a’ with the ‘syms’ command. We can use this variable to obtain our bulk equation. Our bulk equation is like above that is assigned to ‘y’.
YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!
Consider a situation that we want to obtain the fraction form of this equation. So, we used the ‘numden()’ command as you see above.
We assigned two variables to ‘numden()’ as you see above which are ‘nominator’ and ‘denominator’. As you understand from the names, we receive the nominator of fraction form of the equation as an answer that is assigned to ‘nominator’, and ‘denominator’ as an answer.
So, the use of the ‘numden()’ command in Matlab® is very simple to obtain fraction forms.
Do not forget to leave your comments and questions below about the use of the ‘numden()’ command in Matlab® below.
If you want further coding examples about the ‘numden()’ command in Matlab®, inform us in the comments.
This article is prepared for completely educative and informative purposes.
Your precious feedbacks are very important to us.
Leave a Reply