Info

This question is locked. 请重新打开它进行编辑或回答。

how extract two arrays in matlab of unequal length

5 次查看(过去 30 天)
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
  2 个评论
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 个)

This question is locked.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by