how to derivative a function with the vector variable?

10 次查看(过去 30 天)
there is a vectors variable X. And V=[0:0.01:44.8], and a function f(X)=exp(V+3X). I want to get the Difference of f(X), how can I do?
  3 个评论
Mengqian Shi
Mengqian Shi 2021-12-10
Thank you for your answer. And sorry that I did not describe clearly.
X is a vector the same size as V and is a variable. And after I get the Diffrence, which is is also a function with the variable X, i want to iterate the X. The initial value of X=0 and X=exp(V+3X). Then I want to Introduce the value of X to the derivative function. But I don't know how to do that.
Michael Van de Graaff
your vectors V and X have 4481 elements each. and you are iterating at follows:
X0 = 0*V
X1 = exp(V+3X0) (if you plot this, its an exponential)
X2 = exp(V+3X1)
and so on. That is my understanding.
now, after iteration N, you'l have some XN, correct? when you say you want the derivative of X, what precisly do you mean. do you mean that you want the differences between adjacent elements of XN, or do you mean you want how the values of each element changes (so for the 20th element of each Xi as an example, we have X0(20) goes to X1(20) goes to X2(20) goes to..... goes to XN(20), and you can define that difference vector.
What specific quantity do you want the derivative of, and with respect to what other quantity. in the end, diff is what you want.
I'm also assuming that you aren't using the symbolic math toolbox. if you are, you should say so.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

产品


版本

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by