p1_3.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 25 行
M
25 行
% P1_3.M MATLAB functions for f(x) % We will scan through the manual and list a few commands% For trigonometric functions, the value is in radians% The list does not include some functions that make more sense for% vectors and matrices.%% Try help elfun for a longer list%diary p1_3.direcho onx=2.0abs(x) % Same value since x>0.acos(x) % If you don't understand this answer, review complex valuesacosh(x) % There are other functions such as asin, asinh, atan, etc.angle(x) % This is zero for a real numberceil(x) % Other functions are fix, floor and round (Try these for x=2.1) cos(x) % Other functions are cosh, cot, coth, sin, tan, etc.erf(x) % This is an integral; others are expint and gammaexp(x)gamma(x) % For an integer value, this is (n-1) factorialimag(x) % This is zero for x real log(x) % Others are log10 and log2sqrt(x)echo offdiary off
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?