资源简介
可运行的程序,很不错,很适合初学者用。有抽样量化编码三个过程。
代码片段和文件信息
% Removing all variables functions and MEX-files from memory leaving the
% workspace empty.
clear all
% Deleting all figures whose handles are not hidden.
close all
% Deleting all figures including those with hidden handles.
close all hidden
% Clearing all input and output from the Command Window display giving us a clean screen.
clc
% Opening the file ‘TEOTH.mp3‘ in the read access mode.
fid = fopen (‘TEOTH.mp3‘‘r‘);
% Generating the input signal ‘m(t)‘ by reading the binary data in 16 bit
% integer format from the specified file and writing it into a matrix
% ‘m(t)‘.
m = fread (fid‘int16‘);
% Defining the count for efficiency.
count = 8500;
% Calculating maximum value of the input signal ‘m(t)‘.
Mp = max (m)
% Setting number of bits in a symbol.
bits = 8;
% Defining the number of levels of uniform quantization.
levels = 2^bits;
% Calculating the step size of the quantization.
step_size = (2*Mp)/levels
% Setting the sampling frequency.
% because the audio signal has a maximum frequency of 4K and according to
% Nyquist criteria we get the following sampling frequency.
Fs = 8000;
% Setting the sampling instant.
Ts = 1;
% Setting the number of samples to be used.
No_Samples = (2*Fs)+Ts;
% Define the time vector for the calculations.
time = [1:Fs/64];
% Calculating the bit rate.
bit_rate = 8000*bits;
- 上一篇:MATLAB建立的发动机的模型
- 下一篇:matlab 混沌函数工具箱
相关资源
- matlab 混沌函数工具箱
- MATLAB建立的发动机的模型
- CRC校验 海明编码
- 基于单纯形寻优的PID参数整定方法
- MATLAB电机仿真模块
- 随机波束成型rbfmatlab代码
- RS编码MATLAB实现完整版
- 阶比仿真程序,matlab版
-
local self-similarity desc
riptor matlab cod - LPCC特征参数提取
- MATLAB去噪代码
- BP神经网络Matlab实现V1
- Matlab仿真ACO-OFDM信号发送与接收
- CroppedYale人脸数据降维 MATLAB
-
matlab simuli
nk 逆变器并网model VF/PQ控 - 优化问题测试函数matlab代码
- matlab 石头剪刀布
- ARIMA模型MATLAB实现代码
- ID3的MATLAB实现244799
- 最速下降法的MATLAB程序
- 彩色图像分割——matlab实现FCM算法
- 共轭梯度法的matlab实现
- matlab 对一个文件夹里的所有图像进行
- matlab FFT源代码
- Matlab语言进行摄像机模拟并对三维物
- 二维粒子滤波matlab x程序
- matlab间断有限元求解声波方程
- matlab实现USB数据采集
- 画包络谱和幅值谱的matlab程序
- 概率神经网络源码matlab
评论
共有 条评论