필터 지우기
필터 지우기

how to plot the audio into sample?

조회 수: 4 (최근 30일)
Manjutha Manavalan
Manjutha Manavalan 2016년 10월 1일
댓글: Walter Roberson 2016년 10월 1일
clc;
clear all;
close all;
fileName='Voice_002.wav';
[y, fs, nbits]=wavread(fileName);
N = length(y);% % N is the number of samples
sound(y, fs); % Playback of the sound data
time=(1:length(y))/fs; % Time vector on x-axis
plot(time,y);xlabel('Time');
ylabel('Amplitude'); % Plot the waveform w.r.t. time
fprintf('Information of the sound file "%s":\n', fileName);
fprintf('Duration= %g seconds\n', length(y)/fs);
fprintf('Number of samples %g:\n', N);
fprintf('Sampling rate = %g samples/second\n', fs);
fprintf('Bit resolution = %g bits/sample\n', nbits);
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 10월 1일
? Your line
plot(time,y)
already appears to be plotting the samples.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by