フィルターのクリア

Why does rref() make a sound sample sound different?

1 回表示 (過去 30 日間)
Mara Gati
Mara Gati 2016 年 5 月 3 日
コメント済み: Mara Gati 2016 年 5 月 6 日
I was messing around the other day and ended up with the following code:
load handel
h = [y;Fs];
h = h';
d = rref(h);
sound(d)
What does rref() do to make it sound like that?

採用された回答

Star Strider
Star Strider 2016 年 5 月 3 日
It depends on how you give rref the matrix. (Stereo sound files are (Nx2) matrices.)
If you give it as the two-column matrix, you get the result that John describes. If you transpose the matrix (to (2xN), you get an entirely different result.
Experiment:
t = linspace(0, 2)';
M = [sin(2*pi*t) cos(2*pi*t)]; % Create Data
figure(1)
subplot(2,1,1)
plot(t, M)
hold on
plot(t, rref(M), '--')
hold off
grid
subplot(2,1,2)
plot(t, M)
hold on
plot(t, rref(M'), '--')
hold off
grid

その他の回答 (1 件)

John D'Errico
John D'Errico 2016 年 5 月 3 日
Why in the name of god and little green apples would you bother to do this? rref is a linear algebra tool, normally applied to matrices, for a specific purpose. Throwing random numbers into a random function will yield randomly meaningless (and useless) results.
d is a column vector as you create it. rref will take ANY column vector with at least one non-zero element, and return a vector which is entirely zero, except that the first element is 1.
When you then put that into the sound function, it sounds as it does.
  1 件のコメント
Mara Gati
Mara Gati 2016 年 5 月 6 日
I was messing around
:)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAudio 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