|
From: | Doug Stewart |
Subject: | Re: HELP |
Date: | Fri, 18 May 2018 11:54:54 -0400 |
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!
[Prev in Thread] | Current Thread | [Next in Thread] |