calculating residual between two time domain signals
Show older comments
Hello,
I have two time domain signals, e.g.:
y1= 3*cos(10*t+180*pi/180);
y2= 2*cos(10*t+60*pi/180);
What is the correct procedure for calculating the residual of these two signals? The current code I am using is below, where I am simply subtracting the two signals to get the residual signal. I am not sure if the residual is correct and whether the affect of phase difference is taken into account in this calculation.
clear all ;
close all;
clc;
t= 0:0.001:1;
% first signal vector (larger magnitude)
y1= 3*cos(10*t+0*pi/180);
% seond signal vector (smaller magnitude)
y2= 2*cos(10*t+180*pi/180);
% residualI tried
y3=y1-y2;
%% plots
figure
plot(t,y1)
hold on
plot(t, y2)
hold on
plot(t,y3)
legend ('y1', 'y2', 'residual')

Furthermore, the residual signal should be of smaller amplitude then the parent signals, isnt it so? I realise that can be achived by simply adding the signals instead of subtracting(y3= y1+y2 gives the figure below) them but is that the correct way?

Accepted Answer
More Answers (0)
Categories
Find more on Audio Processing Algorithm Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!