Minimizing an equation to 0
조회 수: 2 (최근 30일)
이전 댓글 표시
I have an equation where I am trying to reduce the RMS to 0 i.e RMS(A-(B+C)<=0. A,B and C are known but the RMS is not equal to 0 . Now, I want to modify this equation such that RMS(A-(k1*B+k2*C)<=0. I want to find k1 and k2 to make the RMS as close to 0. How could I do this?
댓글 수: 2
답변 (3개)
Bruno Luong
2022년 9월 11일
편집: Bruno Luong
2022년 9월 11일
This minimize the frobenius norm, or l2 norm of the vectorized residual matrix (divided by sqrt(numel(A)) you'll get the rms)
k=[B(:),C(:)]\A(:);
k1=k(1);
k2=k(2);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Optimization Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!