CT2a_Lab1/ErrorPlot.m

15 lines
228 B
Matlab

close all
clear all
clc
out = sim("Part3.slx");
x = out.x.Data;
error = out.error;
plot(x,error);
xlabel('ADC input (Analog value) x');
ylabel('Quantization error eq = xq* - x');
title('Error graph for the 2-bit quantizer')