how to derivative a function with the vector variable?

조회 수: 10 (최근 30일)
Mengqian Shi
Mengqian Shi 2021년 12월 9일
댓글: Michael Van de Graaff 2021년 12월 10일
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
Michael Van de Graaff 2021년 12월 10일
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