Interpolate the roots/positions of sign changes

버전 1.0.0 (1.72 KB) 작성자: Max Mustermann
This function interpolates the x-positions of roots/sign changes in the data in y and adds the roots to the vectors.
다운로드 수: 0
업데이트 날짜: 2021/12/6

라이선스 보기

Interpolate the x-positions of roots/sign changes in the data in y. This is helpful if you want to treat the positive and negative parts of y differently.
Example: y = x^3 - 4*x has three roots at x = -2, x = 0 and x = 2. The vector
x = linspace(-3, 3, 50)
does not include these roots.
y = x.^3 - 4.*x;
[xNew, yNew] = interpolateRoots(x, y)
interpolates the roots to x = -1.9984, x = 0 and x = 1.9984 and returns the extended vectors xNew and yNew including these interpolated roots at the corresponding positions. xNew and yNew are 53 elements long while x and y contain 50 elements.

인용 양식

Max Mustermann (2024). Interpolate the roots/positions of sign changes (https://www.mathworks.com/matlabcentral/fileexchange/103045-interpolate-the-roots-positions-of-sign-changes), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2021b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0