how extract two arrays in matlab of unequal length

1 Ansicht (letzte 30 Tage)
KIRAN noor
KIRAN noor am 30 Nov. 2022
Kommentiert: Rik am 24 Jan. 2023
Diese(r) Frage wurde durch Rik markiert
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 Kommentar
Rik
Rik am 24 Jan. 2023
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 30 Nov. 2022
Yes interp1 to sample the curves at corresponding points. Then you can subtract them freely.
  1 Kommentar
Matt J
Matt J am 30 Nov. 2022
Bearbeitet: Matt J am 30 Nov. 2022
That shouldn't matter. You can interpolate at the same set of query points Xq,
result = interp1(X1,Y1,xq) - interp1(X2,Y2,xq)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by