im trying to find out how much samples of an audio track are at the Fullscale Value (max and min Value). The Problem is, im new to matlab and dont know exactly the way to get my results.
The Problem is in the second line of my code. Is there a way to get the y value of a signal for every sample ? Or a method to get all the minimum and maximum values ? (findpeaks() dont't work because my signal is an audio file with two channels)
unclipped = audioread(fileName);
total= 0;
values = YV(unclipped);
for k = 1 : lenght(values)
if values(k)== max(unclipped)
total = total + 1;
end
if values(k)== min(unclipped)
total = total + 1;
end
end
display (total);
Get the maximum and count how often your data is equal to the maximum.