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

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;

 채택된 답변

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';

카테고리

도움말 센터File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by