I have downloaded a file from following matlab file exchange link
It has m file and also a simulink(slx) file named "sampling.slx"
Mfile code is below
clc;
clear;
close all;
f = input('Enter the frequency of signal = ');
F = input('Enter the sampling frequency = ');
A = input('Enter max amplitude of signal = ');
qbits = input('Enter the number of quantization bits = ');
fc = input('Enter the lowpass filter cutoff frequency = ');
L = 2^qbits;
I = 2*A/(L-1);
% Settings for Spectrum Scope
span = 8*F;span1 = 8*F;NFFT = 256;
% To run simulink model
t = 1/f;sim_time = 10*t; sim('sampling.slx');
But when i try to run it in my matlab and enter user input value and press the run simulation button i get error shown in attached/linked photo error screenshot
I get in command window following output:
Warning: The specified simulation stop time (0.01) is not an integer multiple of the fixed step size (0.0024). Changing the stop time to (0.0096). You can disable this diagnostic by either specifying a stop time that is an integer multiple of the fixed step size, or setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics tab of the Configuration Parameters dialog
In mfile_sampling (line 14) Error using mfile_sampling (line 14) The interval [-8, 8] kHz defined by the frequency span and center frequency exceeds the Nyquist frequency limits which equal [-208.3333, 208.3333] Hz.