I'm trying to sum two signals at the same frequency, one recorded from the microphone and another that it’s a Matlab default sound file, what I'm intending to do is to make them sound at the same time, while I can record, and play the wav file I can’t seem to be able to add them up in the same frequency, for starters Im attempting to put both signals at the same frequency and the same number or rows
However my current problem Im having it’s that i can’t use decimals in the downsample function so i can’t really put them at the same frequency by using it
Up to now I already have the transposed matrix of both Y and grabacion however, I don’t really understand how to put them at the same frequency and number of rows, so i can add them up and then play them as a single sound
load handel.mat
filename = 'handel.wav';
audiowrite(filename,y,Fs);
clear y Fs
[Y,fs] = audioread('handel.wav');
sound(Y);
%%
X = X = audiorecorder(8000,8,1);
disp('Inicio de grabacion (5s)')
recordblocking(X, 5);
disp('Fin de Grabacion.');
play(X);
grabacion = getaudiodata(X);
plot(grabacion,'r-');
%%
Columna_Izquierda = Y(:,1);
C_I_T = Columna_Izquierda.';
Columna_Derecha = grabacion(:,1);
C_D_T = Columna_Derecha.';