Error minimization by optimizing the parameter value using fminunc
조회 수: 1 (최근 30일)
이전 댓글 표시
function obj = objFunction(q)
data=readtable('solu6_deleted few rows VALUE-Mat1');
A=table2array(data);
size(A)
TF1 = A(:,32)<=0.0001;
A(TF1,:) = [];
size(A)
TF2 = A(:,2)<=0.0001;
A(TF2,:) = [];
size(A)
yex=A(:,33);
x1=A(:,1);
x2=A(:,2);
f1=A(:,4);
f2=A(:,5);
T=A(:,3);
size(T)
yp=@prediction;
obj=norm(yex(':') - yp(':')).^2 ;
---------------------------------------------------
function yp = prediction(q,f1,f2,x1,x2,T)
% Unknown parameter
Q1=q(1);
Q2=q(2);
Q3=q(3);
yp=f1.*log(x1)+f2.*log(x2)+(Q1+Q2.*(f1-f2)+Q3.*(f1-f2).^2).*f1.*f2.*T./298;
what is the wrong with this code ..can anyone please help me ,if any additional info required i will share.
Basically i want to minimize the obj value by optimizing the Q1,Q2,Q3 value using fminunc.
please help me i am new to this software.
댓글 수: 3
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!