How to mix Chirp and Gong signals in matlab

조회 수: 8 (최근 30일)
Chamira Wickramasinghe
Chamira Wickramasinghe 2016년 2월 10일
편집: Jan 2016년 2월 14일
Hi everyone,
I'm wondering about how to mix 'chirp.mat' and 'gong.mat' sample audio files that come with matlab.
Thanks in advance :)

답변 (1개)

Jan
Jan 2016년 2월 10일
편집: Jan 2016년 2월 14일
It depends on what "mix" exactly means.
chirpSignal = load('chirp.mat');
gongSignal = load('gong.mat');
% [EDITED]: chirpSignal -> chirpSignal.y
len = min(size(chirpSignal.y, 1), size(gongSignal.y, 1));
Mixed = (chirpSignal.y(1:len, :) + gongSignal.y(1:len, :)) * 0.5;
  댓글 수: 2
Chamira Wickramasinghe
Chamira Wickramasinghe 2016년 2월 10일
dear sir,
thank u very much for ur answer..
but it says "Undefined function 'plus' for input arguments of type 'struct'."
Jan
Jan 2016년 2월 14일
@Chamira Wickramasinghe: Yes, I made a mistake. You can inspect the values obtained by load and try to find a solution by your own. There is no reason to wait, until I fix the problem. See [EDITED]

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by