solve
함수 근사 문제에 최적화된 해 구하기
구문
solution = solve(problem)
설명
은 solution
= solve(problem
)FunctionApproximation.Problem
객체 problem
에 의해 정의된 최적화 문제를 풀고, 최적화된 결과 solution
을 FunctionApproximation.LUTSolution
객체로 반환합니다.
입력 인수
problem
— 최적화 문제
FunctionApproximation.Problem
최적화 문제로, 근사할 함수 또는 Math Function 블록이나 최적화할 Lookup Table 블록, 최적화 과정 중에 사용할 기타 파라미터와 제약 조건을 정의하는 FunctionApproximation.Problem
객체로 지정됩니다.
출력 인수
solution
— 근사 해
FunctionApproximation.LUTSolution
객체
근사 해로, FunctionApproximation.LUTSolution
객체로 반환됩니다.
예제
수학 함수 근사하기
근사할 수학 함수를 지정하는 FunctionApproximation.Problem
객체를 생성합니다.
problem = FunctionApproximation.Problem('log')
problem = FunctionApproximation.Problem with properties FunctionToApproximate: @(x)log(x) NumberOfInputs: 1 InputTypes: "numerictype(1,16,10)" InputLowerBounds: 0.6250 InputUpperBounds: 15.6250 OutputType: "numerictype(1,16,13)" Options: [1×1 FunctionApproximation.Options]
그 외 모든 옵션에는 디폴트 값을 사용합니다.
solve
메서드를 사용하여 이 함수의 근사를 생성합니다.
solution = solve(problem)
| ID | Memory (bits) | ConstraintMet | Table Size | Breakpoints WLs | TableData WL | BreakpointSpecification | Error(Max,Current) | | 0 | 64 | 0 | 2 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 1.178125e+00 | | 1 | 1984 | 1 | 122 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 4.192649e-03 | | 2 | 1024 | 0 | 62 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 1.416713e-02 | | 3 | 1968 | 1 | 121 | 16 | 16 | EvenPow2Spacing | 7.812500e-03, 4.192649e-03 | | 4 | 64 | 0 | 2 | 16 | 16 | EvenSpacing | 7.812500e-03, 1.138984e+00 | | 5 | 416 | 1 | 13 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.310789e-03 | Best Solution | ID | Memory (bits) | ConstraintMet | Table Size | Breakpoints WLs | TableData WL | BreakpointSpecification | Error(Max,Current) | | 5 | 416 | 1 | 13 | 16 | 16 | ExplicitValues | 7.812500e-03, 7.310789e-03 | solution = FunctionApproximation.LUTSolution with properties ID: 5 Feasible: "true"
그런 다음, approximate
메서드를 사용하여 룩업 테이블 근사가 포함된 서브시스템을 생성할 수 있습니다.
버전 내역
R2018a에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)