Have you a registration already ? Sign In
Cumulative Multiplication Of Vectors And Matrices In MatLab
Factorials are very important aspect of calculus. And engineers are generally calculates calculus problems in Matlab. You can calculate the factorials of various kinds of vectors and matrices in Matlab easily with ‘factorial()’ command in Matlab. In here, we explain how to calculate the factorials in Matlab with ‘factorial()’ command.
a = [2 6 3 6];
b = [5 3 4 6; 4 6 3 6; 4 8 9 3];
x = factorial(a)
y = factorial(b)
z = factorial(10)
As you see in above code in Matlab, we created a vector called ‘a’ and a matrix called ‘b’. The use of ‘factorial()’ command is very simple as you see. Just write the thing inside paranthese of factorial() command to calculate its factorial.
You can assign the factorial() command to a variable, or you directly calculate different factorials in command window of Matlab by writing it without asignment.
x =
2 720 6 720
y =
120 6 24 720
24 720 6 720
24 40320 362880 6
z =
3628800
You can see the results above in Matlab Command Window. The factorial calculation of vector ‘a’ is done for all elements respectively. The same thing is valid for also matrix ‘b’.
Download And Install MatLab R18!
You can also calculate the factorial of a number, just like we calculated the factorial of 10.
Here is the use of factorial() command is very easy to calculate factorials of different things in Matlab.
YOU CAN LEARN MatLab IN MECHANICAL BASE; Click And Start To Learn MatLab!
Do not forget to leave your comments and questions about factorial calculation in Matlab below. Your precious feedbacks are very important for us.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Write Comments