How do I subtract two 2D data sets with different resolutions?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
EM
le 23 Sep 2019
Réponse apportée : Andrei Bobrov
le 23 Sep 2019
Hi,
I have two sets of data as following:
Data set 1:
P1 162x1 double
T1 162x1 double
Data set 2:
P2 2400x1 double
T2 2400x1 double
As you can see, the resolutions of these two set of data are different. I want to subtract the plot (T1,P1) from plot(T2,P2). Since the number of elements are not similar how can I do that?
Thank you
0 commentaires
Réponse acceptée
Andrei Bobrov
le 23 Sep 2019
PP1 = interp1(T1,P1,T2);
dP21_out = P2 - PP1;
plot(T2,P2);
hold on
plot(T2,PP1);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!