how to plot two seperate figures the left and right channels

6 vues (au cours des 30 derniers jours)
Ismail Ata Yavuz
Ismail Ata Yavuz le 5 Jan 2020
Commenté : Star Strider le 6 Jan 2020
what is below written by me shows the plot of the both left and right channel signals at the same time. i would like to plot them seperately into two figures. how can i do that? thanks
close all
clear all
samples=[1,10^5];
[y,fs]=audioread('funk.wav',samples);
t=linspace(0,length(y)/fs,length(y));
plot(t,y)

Réponse acceptée

Star Strider
Star Strider le 5 Jan 2020
Either:
figure
plot(t, y(:,1))
figure
plot(t, y(:,2))
or:
figure
subplot(2,1,1)
plot(t, y(:,1))
subplot(2,1,2)
plot(t, y(:,2))
depending on the result you want.
  2 commentaires
Ismail Ata Yavuz
Ismail Ata Yavuz le 6 Jan 2020
thank you!!
Star Strider
Star Strider le 6 Jan 2020
As always, my pleasure!

Connectez-vous pour commenter.

Plus de réponses (1)

Jesus Sanchez
Jesus Sanchez le 5 Jan 2020

Community Treasure Hunt

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

Start Hunting!

Translated by