Message Boards Message Boards

0
|
6112 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Take n times gradient from a vector?

Posted 4 years ago

Hi. Suppose we have a vector V with two variables x and y. How to take n times gradient from this vector by using Mathematica? Please help me.

POSTED BY: Reza Hamzeh
2 Replies

If I try to interpret what you ask, then you probably mean "how to recursively evaluate the gradient of a function with a vector"; then:

foo[v_] := (* do something *) v^2
n = 3;
v = {x, y};
Nest[Grad[foo[#], #] &, v, n]
POSTED BY: Mikayel Egibyan
Posted 4 years ago

Thank you very much.

POSTED BY: Reza Hamzeh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract