how to plot two seperate figures the left and right channels

조회 수: 14 (최근 30일)
Ismail Ata Yavuz
Ismail Ata Yavuz 2020년 1월 5일
댓글: Star Strider 2020년 1월 6일
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)

채택된 답변

Star Strider
Star Strider 2020년 1월 5일
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.

추가 답변 (1개)

Jesus Sanchez
Jesus Sanchez 2020년 1월 5일

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by