Determine differentiability of a x and y dataset

조회 수: 8 (최근 30일)
Christian
Christian 2017년 3월 8일
편집: Christian 2017년 3월 27일
Hello everybody,
I have a dataset (x old, y old). Now I do some math on it and get a new dataset (x new, y new). To check whether my calculations are correct, the curve of the new datset must be differentiable.
Do you have any ideas, how I could do this "check"?
Thank you
Cheers
Christian
  댓글 수: 1
Christian
Christian 2017년 3월 8일
편집: Christian 2017년 3월 8일
As you can see, the critical spot of the new dataset looks sometimes like this:
And now I need to find out, if the new curve is smooth or looks like above. It would be perfect if the code would give me a result which looks something like this:
new_dataset_1 = false ("not differentiable")
new_dataset_2 = true ("differentiable")
new_dataset_3 = true
new_dataset_4 = false...

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

답변 (1개)

Guillaume
Guillaume 2017년 3월 8일
The concept of diferrentiable does not mean much for a discretised function. By definition dy/dx always exists when you have a vector of x and y values, unless one of y or x is infinite or NaN.
So really the only thing you could test is
assert(all(isfinite(xnew)) & all(isfinite(ynew)))
  댓글 수: 7
Jan
Jan 2017년 3월 8일
Guillaume is right: For a discretized function, the term "differentiable" has no meaning. A line like x=[1,2,3], y=[1,2,100] might or might not represent a differentiable function, because even a smooth function can contain a huge derivative in one point. There is also no to "proove" if sin(1/x) is differentiable in x=0 if all you have is a finite number of its values.
All you can decide based on a set of data points is if the difference between neighboring points exceeds a certain limit or not. But this does not mean differentiablility.
Christian
Christian 2017년 3월 8일
I know what differentiability means, therefore I asked this question to the community.
But I think I might get along with the diff(x) < 0 thing in 99% of the time.

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

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by