octave-maintainers
[Top][All Lists]
Advanced

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

Re: HELP


From: Doug Stewart
Subject: Re: HELP
Date: Fri, 18 May 2018 11:54:54 -0400



On Fri, May 18, 2018 at 9:57 AM, Kordasch, Michaela <address@hidden> wrote:

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

 


you must have a function maned  y
Did you make a file called y.m?


 

 

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!




--
DASCertificate for 206392


reply via email to

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