Find interpolated intersection points between two curves

5 ビュー (過去 30 日間)
Jorge Luis
Jorge Luis 2024 年 1 月 9 日
編集済み: Jorge Luis 2024 年 1 月 10 日
Hello, I have the following two curves: the blue curve (curve1.txt) and orange curve (curve2.txt).
For simplicity, I assumed the orange curve is a straight line. I would like to estimate all the interpolated intersection points based on the frequency values (x_coordinates.txt) which not necesary matches the specific value of the x_coordinates (e.g. one intersection could be 1.127 between the interpolated intersection of the two neighbouring points from both curves). I attached three .txt files for this example. I would appreciate the help. Thank you in advance for your reply.

採用された回答

Matt J
Matt J 2024 年 1 月 9 日
  1 件のコメント
Jorge Luis
Jorge Luis 2024 年 1 月 10 日
編集済み: Jorge Luis 2024 年 1 月 10 日
Thank you so much. It works perfectly on the task. It took 1min and 3 seconds to process just one components of the signal out of three components, though. I used a core i9 laptop with 2gb of ram memory. I will have to process around one hundred thoushand ground motion and each of them has three components along with other complex calculations. That means that just to estimate the intersection points it will take me 208 days.
y1=load('curve1.txt');
y2=load('curve2.txt');
x1=load(x_coordinates.txt);
x2=x1;
% finding the intersection points
[x0,y0,iout,jout] = intersections(x1,y1,x2,y2,'true');

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by