octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HELP


From: Kordasch, Michaela
Subject: HELP
Date: Fri, 18 May 2018 13:57:03 +0000

Hello there,

 

I need help with an simple Octave Code, which shows me this error:

 

>> a=numgrad(y,2)

error: 'x' undefined near line 27 column 5

error: called from

    y at line 27 column 4

 

 

for the following function:

 

function a = numgrad (fname,x)

  h=10^(-8);

  n=length(x);

  for i=1:n

    a(i)=(feval(fname,x+h*einheitsvektor(n,i))-feval(fname,x-h*einheitsvektor(n,i)))/(2*h);

    end

 

 

Thank you!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]