To manually determine the gradient of a function in Matlab, you can use the symbolic math toolbox. Here is an example of how to find the gradient of a function using this approach:
main.m24 chars3 lines
main.m28 chars2 lines
main.m28 chars2 lines
The output of this command will be the gradient of the function at the point (1,2), which is [2, 12].
gistlibby LogSnag