| Author |
Comment/Response |
Kevin
|
03/23/09 11:37am
I am trying to use ND to find the numerical derivative of some function which involves using FindRoot. My starting point for FindRoot depends on the variable that I am taking the ND with respect to. But I get errors from FindRoot/ND when I try it.
For example, try
f[startPos_] := x /. FindRoot[Sin[x] == 0, {x, startPos}];
Needs["NumericalCalculus`"];
ND[f[startPos], startPos, 30]
FindRoot outputs errors that startPos is not a number. Why doesn't ND work in this case? I can plot f[startPos], so why can't I take it's numerical derivative?
URL: , |
|