PROGRAM MATLAH

 clc;

clear all;
% Enter the value Input Continuous signal
Ts=0.04; % Sampling Time period of 50 Hz signal
t=0:0.0005:0.02;
fs = 1/Ts; % fs>=2fm, fm = 50Hz
% Plot for Input Continuous signal
n1=0:40;
size(n1)
xa_t=sin(2*pi*2*t/Ts);
subplot(2,2,1);
plot(200*t,xa_t);
title('Verification of sampling theorem');
title('Input Continuous signal');
xlabel('t(sec)');
ylabel('x(t)');
% Sampled signal;
ts1=0.002; % > Nyquist rate
ts2=0.01; % = Nyquist rate
ts3=0.1; % < Nyquist rate
n=0:20;
x_ts1=2*sin(2*pi*n*ts1/Ts);
subplot(2,2,2);
stem(n, x_ts1);
title('Sampling rate greater than Nq');
xlabel('n');
ylabel('x(n)');
n=0:4;
x_ts2=2*sin(2*pi*n*ts2/Ts); % Use numeric pi
subplot(2,2,3);
stem(n, x_ts2);
title('Sampling rate equal to Nq');
xlabel('n');
ylabel('x(n)');
n=0:10;
x_ts3=2*sin(2*pi*n*ts3/Ts);
subplot(2,2,4);
stem(n, x_ts3);
title('Sampling rate less than Nq');
xlabel('n');
ylabel('x(n)');



Practice java basic programs on the following.
1. Sum of digits
2. Reverse the given integer
3. Create 1 dimensional and 2 dimensions array
4. Palindrome program
5. Odd or even
6. Fahrenheit to celsius conversion
7. Biggest of 4 numbers
8. Armstrong no
9. Amicable Number
10. Matrix addition

Comments

Popular posts from this blog

C PROGRAMMING BASICS

3.1.24 Test link