선형 최소제곱
범위 또는 선형 제약 조건이 있는 선형 최소제곱 문제 풀기
최적화 문제를 풀기 시작하기 전에 먼저 문제 기반 접근법과 솔버 기반 접근법 중 적절한 접근법을 선택해야 합니다. 자세한 내용은 먼저 문제 기반 접근법 또는 솔버 기반 접근법 중 선택하기 항목을 참조하십시오.
선형 최소제곱은 min||C*x - d||2을 풉니다. 여기에는 범위나 선형 제약 조건이 있을 수 있습니다.
문제 기반 접근법에서는 문제 변수를 생성한 후 기호화된 변수로 목적 함수와 제약 조건을 나타냅니다. 문제 기반으로 수행할 절차를 보려면 문제 기반 최적화 워크플로 항목을 참조하십시오. 결과로 생성된 문제를 풀려면 solve
를 사용하십시오.
솔버 기반으로 수행할 절차를 보려면 솔버 기반 최적화 문제 설정 항목을 참조하십시오. 목적 함수와 제약 조건을 정의하고 적합한 솔버를 선택하는 등의 작업이 설명되어 있습니다. 결과로 생성된 문제를 풀려면 lsqlin
을 사용하십시오. 음이 아닌 최소제곱의 경우 lsqnonneg
를 사용할 수도 있습니다.
함수
라이브 편집기 작업
최적화 | 라이브 편집기에서 방정식을 최적화하거나 풉니다. (R2020b 이후) |
도움말 항목
문제 기반 선형 최소제곱
- Shortest Distance to a Plane
Shows how to solve a linear least-squares problem using the problem-based approach. - Nonnegative Linear Least Squares, Problem-Based
Shows how to solve a nonnegative linear least-squares problem using the problem-based approach and several solvers. - Large-Scale Constrained Linear Least-Squares, Problem-Based
Solves an optical deblurring problem using the problem-based approach. - Write Objective Function for Problem-Based Least Squares
Syntax rules for problem-based least squares.
솔버 기반 선형 최소제곱
- Optimize Live Editor Task with lsqlin Solver
Example showing the Optimize Live Editor task and linear least squares. - Nonnegative Linear Least Squares, Solver-Based
This example shows how to use several algorithms to solve a linear least-squares problem with the bound constraint that the solution is nonnegative. - Jacobian Multiply Function with Linear Least Squares
Example showing how to save memory in a large structured linear least-squares problem. - Warm Start Best Practices
Describes how best to use warm start for speeding repeated solutions. - Large-Scale Constrained Linear Least-Squares, Solver-Based
Solves an optical deblurring problem using the solver-based approach.
코드 생성
- 선형 최소제곱에서의 코드 생성: 배경 정보
선형 최소제곱에 대한 C 코드를 생성하기 위한 선행 조건입니다. - Generate Code for lsqlin
Example of code generation for linear least squares. - Optimization Code Generation for Real-Time Applications
Explore techniques for handling real-time requirements in generated code.
문제 기반 알고리즘
- Write Objective Function for Problem-Based Least Squares
Syntax rules for problem-based least squares. - 문제 기반 최적화 알고리즘
최적화 함수 및 객체가 최적화 문제를 푸는 방법을 알아봅니다. - Supported Operations for Optimization Variables and Expressions
Explore the supported mathematical and indexing operations for optimization variables and expressions.
알고리즘과 옵션
- 최소제곱(모델 피팅) 알고리즘
범위 제약 조건 또는 선형 제약 조건만 적용하여 n차원에서 제곱합을 최소화합니다. - 최적화 옵션 참조
최적화 옵션을 살펴봅니다.