Blitz optimization Algorithm!

Source: Internet
Author: User

The Matlab language can be converted or invoked with the C + + language.

MATLAB statement: Load name loads all the variables of the file in name into the workspace. Save name saves the variable in the workspace to Name.mat.

Cholesky decomposition divides a positive definite matrix into a lower triangular matrix and a product of its transpose matrix.

Two methods of creating symbolic functions: The SYM function and the Syms function, the SYM function can generate only one variable at a time, and syms can generate multiple variables.

Commonly used symbolic operations: extremum, Series summation, calculus, solving differential equations.

Plot3 function: Draw three-dimensional image, mesh to draw three-dimensional mesh surface, surf to draw three-dimensional shadow surface, using mesh to draw three-dimensional grid diagram, first use Meshgrid to mesh.

EPS to replace 0, the value size is close to 0, but in the divisor is safe, this is used in MATLAB in a trick!

Figure (1) ... figure (n) is used to open different graphics windows to draw different graphics

Axis[xmin xmax ymin Ymax] gives the minimum maximum value of the x-axis, the minimum maximum of the y-axis, respectively. SEMILOGX x is the logarithmic coordinate (base 10) and Y is the semi-logarithmic shape of the ordinate.

Subplot (m,n,p) m,n is used to split the graphics window, p represents the drawing number

The Gtext command in the drawing is used to put descriptive text on a point in the graph (there will be a cursor on the graph you want to choose).

Bar is used to draw a bar chart, hist the number of distributions with Y as the center X, stairs to draw a ladder chart, and a stem scatter plot.

Linetype r+: Color is red, dot is +, line is dot draw line

M files are divided into script m files and function m files. The script function file does not accept input and output, sharing the value of the variable with the variable space. The function has its own variable storage space.

The switch statement does not necessarily end with otherwise

The For loop knows the number of loops. While do not know. Continue causes the current loop to not execute downward, jumping into the next loop. Break statement exits the loop!

Return statement exits the program directly without executing subsequent code

Overloaded with similar functions but with different parameter types or numbers;

After global variables are declared within a function with global, changes to the global variables within the function are reflected in the workspace.

The Echo on command is available for debugging and displays each statement executed by the M file.

A m-file can contain more than one function, which has a main function that is used to invoke the file. The secondary function defined is the service of the primary function and the other secondary functions.

Pause (n) is placed in the M file and can be paused for n seconds.

MATLAB can solve optimization problems: The minimum value of the unary function (The independent variable has the range of values), unconstrained minimum (available search function to do), linear programming, 0.1 integer programming, two planning; constrained minima; minmax; nonlinear least squares; target arrival;

By using the least squares method, the unknown data can be easily obtained, and the sum of the errors between the obtained data and the actual data is minimized.

The fixed point algorithm can find nonlinear equations and an iterative method.

Newton's method of finding F (x) = 0 is also an iterative method for root finding. The Schroeder method is similar to it.

Seidel method is the generalization of fixed point method.

For non-smooth optimization problems, fminsearch is more suitable than fminunc.

The Trust region method can only solve the constrained optimization problem of linear equality constraints.

GA algorithm: Genetic algorithm.

One-dimensional search method is used to solve unconstrained one-dimensional extremum problem, and one-dimensional search is the minimum point of finding the objective function in a certain direction, and the method is to obtain new points based on known points, and new points are better.

One-dimensional search is divided into linear search and nonlinear search, and linear search includes Golden Division, Fibonacci, Newton method. Nonlinear search includes parabolic, three-time interpolation method.

Blitz optimization Algorithm!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.