how extract two arrays in matlab of unequal length

1 回表示 (過去 30 日間)
KIRAN noor
KIRAN noor 2022 年 11 月 30 日
コメント済み: Rik 2023 年 1 月 24 日
この 質問 は Rik さんによってフラグが設定されました
I have datasets of unequal length, like data file 1 has 47 data points and data file 2 has 649 data points , now i want diffence of these two curves, but I am looking for options , how to extract them.
I am attaching image of the plots.
please guide.
Regards,
Iqra
  1 件のコメント
Rik
Rik 2023 年 1 月 24 日
I recovered the removed content from the Google cache (something which anyone can do). Editing away your question is very rude. Someone spent time reading your question, understanding your issue, figuring out the solution, and writing an answer. Now you repay that kindness by ensuring that the next person with a similar question can't benefit from this answer.

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

採用された回答

Matt J
Matt J 2022 年 11 月 30 日
Yes interp1 to sample the curves at corresponding points. Then you can subtract them freely.
  1 件のコメント
Matt J
Matt J 2022 年 11 月 30 日
編集済み: Matt J 2022 年 11 月 30 日
That shouldn't matter. You can interpolate at the same set of query points Xq,
result = interp1(X1,Y1,xq) - interp1(X2,Y2,xq)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by