Comparison two curves (functions)

11 次查看(过去 30 天)
If the function g(z) gives the curve as shown in the figure how can I detect the fault tracepoint (green dash line) and its location on the x-axis as and put a slant line at the curve by Matlab
using the inverting point of the curve? please urgently I need an answer. Thanks in advance.
  1 个评论
dpb
dpb 2022-5-14
The figure looks like they found the zero-crossing of the model

请先登录,再进行评论。

回答(1 个)

Star Strider
Star Strider 2022-5-14
Use interp1
x = linspace(1, 20, 30);
y = tanh(x-12-rand)*2.5;
x0 = interp1(y,x,0)
x0 = 12.7191
figure
plot(x,y, x0,0,'+r', 'MarkerSize',15)
grid
ylim([-3 3])
.

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by