What does the following error mean? Undefined function 'diffjac' for input arguments of type 'function_handle'. Error in Heq_Nwt (line 23) df = diffjac(x1,f,f0)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
My code is below. Not sure why I cannot use diffjac function. I also get an error for input arguments of type 'double' if I change my diffjac inputs to (x1,f,f0).
function [ x, ex] = Heq_Nwt( f, x1, tol, nmax )
c=.8;
N=10;
x2 = ones(N,1);
x1 = transpose(x2);
meu=1:N;
meu=(meu-.5)/N;
meu=meu';
cs=.5*c/N;
ChH= meu';
in = @(x1) sum((ChH'*x1)./(bsxfun(@plus, ChH',ChH)));
n2=ones(N,1)';
f = @(x1)x1 - (n2-(cs*(in(x1)))).^-1
f0 = f(x1)
df = diffjac(x1,f,f0)
0 comentarios
Respuestas (4)
Matthew
el 23 de Abr. de 2015
Hi Branden,
What are the results of
which diffjac -all
?
If its empty, then you need to add the folder diffjac is in to your path. If its not, then diffjac is written for a different type of object, and to use it you will need to overload it and define your desired behavior from it.
0 comentarios
Ahmet Cecen
el 23 de Abr. de 2015
diffjac.m and dirder.m works perfectly fine for me. Your inputs must be different than intended.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!