필터 지우기
필터 지우기

How to give a variable(here 17658x2 matrix) some proper units desired ?

조회 수: 1 (최근 30일)
[y,fs] = audioread('damn-it.wav');
plot(y); ----
when this code runs audio is stored in 'y' and on plotting ,it shows numbers from zero to 17658 on x-axis. I want to know amplitude at different times so x-axis unit in secs(here 'usec') is desired.

채택된 답변

Walter Roberson
Walter Roberson 2018년 2월 24일
t = (0:size(y,1)-1)/fs;
plot(t, y)
  댓글 수: 10
Abhishek Maurya
Abhishek Maurya 2018년 2월 27일
Thank you,Yes, you are right. But sum(ismembertol(y, 0.1)); is also not tolerant enough for 16 bit signed representation of wav files. Its giving zero for every values.
Walter Roberson
Walter Roberson 2018년 2월 27일
Read the documentation for ismembertol on how to provide your own tolerance

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

추가 답변 (0개)

카테고리

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