필터 지우기
필터 지우기

Error minimization by optimizing the parameter value using fminunc

조회 수: 1 (최근 30일)
DURGA PRAJAPATI
DURGA PRAJAPATI 2021년 9월 5일
댓글: Mathieu NOE 2021년 9월 7일
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
DURGA PRAJAPATI
DURGA PRAJAPATI 2021년 9월 7일
Thankyou for your reply.
Actually there was problem in calling the function .But I have resolved .
Mathieu NOE
Mathieu NOE 2021년 9월 7일
Good news ! have a good day

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by