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

1 vue (au cours des 30 derniers jours)
[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.

Réponse acceptée

Walter Roberson
Walter Roberson le 24 Fév 2018
t = (0:size(y,1)-1)/fs;
plot(t, y)
  10 commentaires
Abhishek Maurya
Abhishek Maurya le 27 Fév 2018
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 le 27 Fév 2018
Read the documentation for ismembertol on how to provide your own tolerance

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by