# Unrecognized function or variable 'seccionAurea'.

조회 수: 3(최근 30일)
ataberk kaplica 2020년 12월 21일
답변: Tarunbir Gambhir 2020년 12월 24일
function powellmethod
max=0;
f=@(x1,x2) 25*(x1)^2+2.5*(x2)^2+15*(x1)*(x2)-25*(x1)-10*(x2);
x0=[2;2];
tol=0.045;
Maxiter=100;
bk=5;
n=size(x0,1);
iter=1;
D=eye(n);
y1=x0;
k=1;
j=1;
d=zeros(n,1);
alpha=0;
iter=iter+1;
[alpha]=seccionAurea(f,x0,d,bk,max)
x1=x0+alpha*d;
y1=x1;
Da(iter,:)={iter,x0 , d , alpha , Fgrad, x1};
x0=x1;
break
end
p=Da{iter,4}*Da{iter,3};
q=Da{iter,5}*Da{iter-1,5};
D=D+((p*p')/(p'*q))-((D*q*q'*D)/(q'*D*q));
iter=iter+1;
end
code gives error when run it , same code work in my teacher laptop but gives me an error ,code is %100 same with teacher

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

### 답변(1개)

Tarunbir Gambhir 2020년 12월 24일
On your teachers machine, use "which" function to locate where the function "seccionAurea" is defined.
which seccionAurea
Make sure that this file is on the MATLAB path for your machine. Refer to this question for how to set path for user defined functions.

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

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by