⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 examp47.m

📁 ADSP TOOLBOX: Version 2.0 and gui m-files
💻 M
字号:

clc,echo on 
%EXAMPLE 47 
N=200;t=(0:N-1)*0.01;                 % Time array 
x=sin(2*pi*t);                        % DT sampled signal 
d=max(x)-min(x);                      % Dynamic range 
b=3;L=2^b;                            % Number of levels 
s=d/L;                                % Step size 
y=s*round(x/s);                       % round (use FLOOR to truncate) 
plot(t,x);hold on,                    % Overplot CT signal samples
dtplot(t,y);hold off,pause(2)         % And quantized signal. 
e=x-y;hist(e,L);                      % Error signal and its histogram. 
snra=10*log10(sum(x.*x)/sum(e.*e))    % Quantization SNR
echo off %end of example

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -