I need to find out the compression ratio of an audio signal ?Is it correct method that I have done here?

5 vues (au cours des 30 derniers jours)
byte_size_of_sampled_signal=4.826071911134670e-42 kb ;
byte_Size_of_compressed_data=4.663521289272991e-42kb;
byte_Size_of_decompressed_signal=2.326155450779196e-42kb;
Calculation of compression ratio:
Is this method is correct????????????
C.R=byte_Size_of_compressed_data/byte_size_of_sampled_signal=0.966318234610918;
OR
this method is correct???????????
C.R=byte_Size_of_decompressed_signal/byte_size_of_sampled_signal=0.481997677119628;

Réponse acceptée

Walter Roberson
Walter Roberson le 31 Août 2015
Modifié(e) : Walter Roberson le 31 Août 2015
No. Any program that is telling you that you have 10^(-42) Kb of anything is broken.
You know that I posted the correction for your file size routine a while ago. You had
switch returnType
case {'b','byte','bytes'}
b = s.bytes;
% case {'kb','kbs','kilobyte','kilobytes'}
b = b / 1024;
%case {'mb','mbs','megabyte','megabytes'}
b = b / 1024^2;
%case {'gb','gbs','gigabyte','gigabytes'}
b = b / 1024^3;
%case {'tb','tbs','terabyte','terabytes'}
b = b / 1024^4;
%case {'pb','pbs','petabyte','petabytes'}
b = b / 1024^5;
otherwise
returnType = 'bytes';
and the problem with that is that when you comment out a "case" label you do not comment out the action that goes with it. You need
switch returnType
case {'b','byte','bytes'}
b = s.bytes;
case {'kb','kbs','kilobyte','kilobytes'}
b = b / 1024;
case {'mb','mbs','megabyte','megabytes'}
b = b / 1024^2;
case {'gb','gbs','gigabyte','gigabytes'}
b = b / 1024^3;
case {'tb','tbs','terabyte','terabytes'}
b = b / 1024^4;
case {'pb','pbs','petabyte','petabytes'}
b = b / 1024^5;
otherwise
returnType = 'bytes';

Plus de réponses (1)

PRATIBHA WARKADE
PRATIBHA WARKADE le 31 Août 2015
thank u very much sir i got the answer

Catégories

En savoir plus sur Audio Processing Algorithm Design 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