Is there built in function such as iseven,isint and factorial in matlab?

104 次查看(过去 30 天)
Is there built in functions in matlab such as iseven,isint and factorial in matlab? Can any one please help?

采纳的回答

Stephen23
Stephen23 2015-2-13
编辑:Stephen23 2015-2-13
Factorial exists:
factorial(N)
But for the others use some basic code:
mod(N,2)==0 % iseven
mod(N,2)==1 % isodd
fix(N)==N % isint
Tip: learn to navigate the MATLAB documentation using the Contents (on the left-hand side of the webpage). There you can browse and find many related functions and lots of useful information. Try it! Open the page for factorial , and you can see the contents also lists similar functions: gcd, factor, lcm, etc.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fortran with MATLAB 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by