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)
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (4 件)
Matthew
2015 年 4 月 23 日
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 件のコメント
Ahmet Cecen
2015 年 4 月 23 日
diffjac.m and dirder.m works perfectly fine for me. Your inputs must be different than intended.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!