How to can I change axis from samples to time?
32 ビュー (過去 30 日間)
古いコメントを表示
I have loaded my audio file with the following code "handles.myRecording = audioread (uigetfile('*.*','Load a File'));" Next I use "plot(handles.myRecording);" to plot the graph, but the x axis is in samples. How can I change it to time?
0 件のコメント
採用された回答
Star Strider
2014 年 9 月 30 日
You should also have a sampling frequency (Fs) variable in your audio file. To convert the index vector to a time vector:
samples = 0:10; % Sample Indices Vector
Fs = 44100; % Sampling Frequency (Hz)
t = samples/Fs; % Time Vector (seconds)
I assume a value for ‘Fs’ here, yours may be different.
1 件のコメント
ladan hz
2017 年 10 月 9 日
what if the sample is a table of 170 rows and 54 column ? is it possible to convert it to time also ? the value of my table is in frames
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!