Why pitch function is not working ?

[audioIn,fs] = audioread('G:\guitar tune\guitartunes\A_String.wav'); [f0,idx] = pitch(audioIn,fs); subplot(2,1,1) plot(audioIn) ylabel('Amplitude')
subplot(2,1,2) plot(idx,f0) ylabel('Pitch (Hz)') xlabel('Sample Number')
This is my code. If i run this, its show like this as output.
Undefined function or variable 'pitch'.
Error in Siva2109 (line 10) [f0,idx] = pitch(audioIn,fs);

2 Comments

Which Matlab version you are using?

Sign in to comment.

 Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 21 Sep 2018
Edited: KALYAN ACHARJYA on 21 Sep 2018
Please note that picth function was Introduced in R2018a
For older version, this link may be helpful: How to extract the pitch of a signal?

2 Comments

Can i know which command i can use for 2016 version to get same results ?
KALYAN ACHARJYA
KALYAN ACHARJYA on 21 Sep 2018
Edited: KALYAN ACHARJYA on 21 Sep 2018
Wait I have to figure out. As the question is answered, why it is not working.
I have added one extra line in the answer, please check.

Sign in to comment.

More Answers (0)

Categories

Find more on Measurements and Spatial Audio in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!