how to find the compression ratio of this ?please reply(its a audio file having sampling frequency of 8192 Hz)

 Accepted Answer

The size in bytes of a signal cannot be less than 1. Your sizes are invalid, so there is no point in calculating a compression ratio from them.

5 Comments

if byte_size_of_sampled_signal = 7.1578e-42 kb
and byte_Size_of_compressed_data = 1.3806e-41 kb what should I do then if I am getting the values in kilobyte?
1 kilobyte is 1024 bytes is 8192 bits. 1.3806e-41 kilobyte is then 1.13098752e-37 bit, which is 1/8841830544690714182239605968419527741'th of 1 bit. Your calculations that lead you to those values are therefore badly wrong.
Your sizes in kilobytes should never be less than about 0.00098 which is 1 byte.
In this code I have taken the audio signal having 143KB size and 8192 Hz as sampling frequency,may be because of it I am getting invalid answer. Can I take audio samples having sizes in MB in order to get better result .For example 203 KB audio sample having 44100 hz as sampling frequency,can I take this sample ?
The unit of size does not matter. Compression ratio is a ratio. You might as well use bytes if you are comparing file sizes (since dir() will tell you the size in bytes directly) and you might as well use numel() if you are comparing variables of the same class.

Sign in to comment.

More Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!