필터 지우기
필터 지우기

Scaling the derivative of a data vector?

조회 수: 1 (최근 30일)
Superfish
Superfish 2012년 3월 17일
I have a vector of data, and I would like to scale the derivative of this data by some amount, and see the how it changes the original data.
How can I do this? Thanks.

채택된 답변

Jan
Jan 2012년 3월 17일
You could calculate the gradient, multiply if by the factor and integrate.
But the result can be found without calculating the gradient explicitely also. Hint: Write down the (forward or backward or centered) difference quotient.
Is this a homework?
  댓글 수: 2
Superfish
Superfish 2012년 3월 17일
Not homework. Just a guy whose brain is failing at maths trying to do some simple data analysis :)
Thanks, upon researching numerical integration more just now I found the function cumtrapz, I was using trapz and getting confused.
Jan
Jan 2012년 3월 18일
Another hint: x = rand(1, 6);
disp(gradient(x)); disp(gradient(x)*2); disp(gradient(x*2));
See: http://en.wikipedia.org/wiki/Linear_Operator

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by