Appendix 1 MATLAB Common Functions
1, special variables and constants
The variable name of ans calculation result determines the running computer.
The relative precision of Eps floating point Inf is infinite.
I imaginary unit input name input parameter name.
NaN non-numeric input parameter number
Output parameter number pi pi pi
Effective number of Nargoutchk output parameters realmax maximum positive floating point number
Realmin Minimum Positive Floating Point varargin Actual Input Parameter
Arguments actually returned by varargout.
Operators and special characters
+positive-negative
* Matrix multiplication. * Array multiplication (corresponding element multiplication)
The power of the matrix. The power of the array (the power of each element)
\ Left separator or backslash/right separator or slash
. /array division (corresponding element division) Kroneck tensor product
: Enclose it with a colon ().
[] Square. decimal point
.. parent directory ... continue
, comma (split multiple commands); Semicolon (results are prohibited)
% comments! exclamation mark
Transpose or reference = assignment
= = equal
& Logical AND | Logical OR
~ logical XOR logical XOR
2. Basic mathematical functions
Abs absolute value and complex modulus length acos, acodh anti-cosine, anti-hyperbolic cosine
Anti-hyperbolic cotangent
Phase angle asec, arc tangent, inverse hyperbolic secant
Antitangent tangent asin, sine of asinh, inverse hyperbolic sine
Atan, Atan arc tangent, hyperbolic tangent
Atan2 quadrant arc tangent ceiling is rounded to infinity.
Complexity creates complex conj complex pairing.
Cosine, cosine, hyperbolic cosine, cosine cotangent, hyperbolic cotangent
Hyperbolic cotangent index
Fix is rounded to 0, and floor is rounded to negative infinity.
Imaginary part of the complex value of the greatest common factor imag of gcd
Least common multiple logarithm natural logarithm
Log2 Logs with Base 2 log 10 Common Logs
Modular signed complement nchoosek binomial coefficients and all combination numbers
Divide the real part of the real complex number by rem, and then get the remainder.
Round to the nearest integer second, secant and hyperbolic secant.
Symbol number sin, sinh sine, hyperbolic sine
Square root tangent, tangent, hyperbolic tangent
3. Basic Matrix and Matrix Operation
Blkding establishes the block diagonal matrix eye identity matrix from the input parameters.
Linespace generates linear spacing vector logspace generates logarithmic spacing vector.
The number of numel elements is 1, resulting in an array full of 1.
Rand uniformly publishes random numbers and arrays. randn normally distributes random numbers and arrays.
Zeros constructs an all-zeros matrix: (colon) equidistant vector.
Cat connects array diag diagonal matrix and matrix diagonal.
Fliplr flips the matrix from left to right, flipud flips the matrix from top to bottom.
Repmat copies an array shaping transformation matrix.
Roy90 matrix flips the lower triangle of 90-degree tril matrix
Upper triangular point vector point set of triu matrix
Ismember, cross vector cross set, detects the elements of a set.
Intersection vector XOR set of intersection vector set
The union of the union vectors in the setdiff direction is the difference set.
Numerical analysis and Fourier transform
Cumulative accumulation
Cumulative trapezoidal method for calculating quality factor of numerical differential factor
Inpolygon deletes the maximum value of the point max in the polygon area.
Average median of the average array
Min Min allows all possible changes.
Prime numbers in multiple regions generate a list of prime numbers.
Rectangular intersection area of product tangents of product array elements
Sort arranges matrix elements in ascending order sortrows arranges rows in ascending order.
Sum of standard deviation
Var variance of trapezoidal numerical integration
Del 2 discrete Laplacian difference and difference estimation
Gradient numerical gradient covers covariance matrix
Two-dimensional convolution of corrcoef correlation coefficient conv2
Conv convolution and polynomial multiplication filter or FIR filter
Deconvolution and Polynomial Division Filter 2 2D Digital Filter
Cplxpair classifies complex values as one-dimensional fast Fourier transform of fft with yoke.
Fftt2 two-dimensional fast Fourier transform fftshift moves the DC component of FFT to the center of spectrum.
IFFT one-dimensional inverse fast Fourier transform ifft2 two-dimensional inverse Fourier transform
Inverse FFT migration of multi-dimensional fast Fourier transform ifftshift
Nextpow2 2 latest power expansion correction phase angle
Polynomial sum interpolation
Conv convolution of root polynomials and polynomial multiplication roots
Polynomial differential with set roots
Multivariate polynomial fitting with characteristic roots of multivariate polynomials
Polynomial evaluation of multivalued analytic polynomial integral multivalued polynomial
Polynomial evaluation of fractional expansion of residual part of multivariate matrix variables
Interp 1 one-dimensional interpolation Interp 2 two-dimensional interpolation
Interp 3 three-dimensional interpolation interpft adopts FFT one-dimensional interpolation.
Interpn multidimensional interpolation grid generates x and y grids for 3D points.
Ndgrid generates multi-dimensional function and interpolation array pchip piecewise cubic Hermite interpolation polynomial
Interpolation of value spline cubic spline data of ppval piecewise polynomial
Drawing function
Bar chart vertical bar chart horizontal bar chart
Historical histogram historical histogram count
Hold saves the loglog x, y logarithmic coordinate diagram of the current graph.
Pie chart pie chart drawing two-dimensional chart
Polar coordinate semi-logarithmic axis logarithmic coordinate diagram
Semi-logarithmic xx axis logarithmic coordinate subgraph drawing subgraph
Bar3 Digital 3D Vertical Bar bar3h Horizontal 3D Bar Chart
Comet3 3D comet map cylinder
Fill 3 Filled 3D Polygon Drawing 3 3D Space Drawing
Quiver3 3D vibration (velocity) diagram slice volume slice diagram
Sphere The sphere handle 3 draws discrete surface data.
Waterfalls draw three triangular waterfall faces.
C tag: add date scale data format tag to delineator check-in contour map.
Grid plus grid line gtext Use the mouse to put the text into the 2D drawing.
Legend Legend plotyy draws the y axis on the left and right sides.
Title Title xlabelX axis label
YlabelY axis label zlabelZ axis label
Contour contour map contour calculation
Elimination of hidden grid lines in contour map filled with contour lines
Grid connection grid with reference axis/contour grid 3D grid
Surf 3D Shadow Surface Diagram of Peak Sampling Function with Two Variables
The surface establishes the combination of surface wave and contour line, which are low-level objects on the surface.
Triangulation of three-dimensional shadow surface under surface illumination