Sunday 28 October 2012

Program for Normal Distribution using CDF

Here is a program of MAT LAB for normal distribution N(mu,sigma) using CDF.
CDF stands for Cumulative Density Function.

open MAT LAB open new script and paste this program :-

Program :-
-----------------------------------------------------------------------------------------------------------------------


mu=100;
sigma=15;
xmin=70;
xmax=130;
n=100;
k=10000;
x=linspace(xmin,xmax,n);
c=normcdf(x,mu,sigma);
plot(x,c);
xlabel('x');
ylabel('cdf');
title('cumulative density function');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run.

Output :-





IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...


Program for Normal Distribution using PDF

Here is a program of MAT LAB for normal distribution N(mu,sigma) using PDF.
PDF stands for Probability Density Function.

open MAT LAB open new script and paste this program :-

Program :-
-----------------------------------------------------------------------------------------------------------------------


mu=100;
sigma=15;
xmin=70;
xmax=130;
n=100;
k=10000;
x=linspace(xmin,xmax,n);
p=normpdf(x,mu,sigma);
plot(x,p);
xlabel('y');
ylabel('pdf');
title('probability density function');

-----------------------------------------------------------------------------------------------------------------------


just paste the program, press run. :-

Output :-

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...



Histogram of Random Number Distribution

Here is a program for random number distribution from N(mu,sigma).  (HISTOGRAM)

open MAT LAB open new script and paste this program :-

Program :-

-----------------------------------------------------------------------------------------------------------------------



mu=100;
sigma=15;
k=10000;
y=normrnd(mu,sigma,k,1);
%subplot(133);
hist(y,20);
xlabel('y');
ylabel('frequency');
title('histogram of random values');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run.

Output :-




IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...


Generation of Random signal

Here is a program of MAT LAB for generation of random signals in continuous and discreet form.

open MAT LAB open new script and paste this program :-

Program :-
-----------------------------------------------------------------------------------------------------------------------


n=input('enter yhe value of n=');
x=rand(1,n);
subplot(211);
stem(x);
ylabel('amp.');
xlabel('time');
title('dis. random signal');


subplot(212);
plot(x);
ylabel('amp.');
xlabel('time');
title('cont. random signal');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run, enter the value of 'n' (numerical). get output :-

Output :-

Note :-
              output will be different every time because it is a random signal

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...



Program for Addition & Subtraction of two signals

Here is a program of MAT LAB for addition & subtraction of two signals in continuous and discreet form.

open MAT LAB open new script and paste this program :-

Program :-
-----------------------------------------------------------------------------------------------------------------------


n=input('enter the value of n=');
t=0:0.005:n;
f=1;


x=sin(2*pi*f*t);
y=cos(2*pi*f*t);
z=x+y;
z1=x-y;


subplot(321);
plot(t,x);
ylabel('amp.');
xlabel('time');
title('cont. sine wave');


subplot(322);
plot(t,y);

ylabel('amp.');
xlabel('time');
title('cont. cosine wave');


subplot(323);
plot(t,z);
ylabel('amp.');
xlabel('time');
title('cont. addition wave');


subplot(324);
plot(t,z1);
ylabel('amp.');
xlabel('time');
title('cont. subtraction wave');


subplot(325);
stem(t,z);
ylabel('amp.');
xlabel('time');
title('dis. addition wave');


subplot(326);
stem(t,z1);
ylabel('amp.');
xlabel('time');
title('dis. subtraction wave');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run, enter the value of 'n' (numerical). get output :-

Output :-

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...


Program for Convolution of two signals

Here is a program for convolution of two signals in MAT LAB in continuous and discreet form.

open MAT LAB open new script and paste this program :-

Program :-

-----------------------------------------------------------------------------------------------------------------------


n=input('enter the value of n=');
t=0:0.02:n;
f=1;

x1=sin(2*pi*f*t);
subplot(321);
plot(t,x1);
ylabel('amp.');
xlabel('time');
title('cont. sine wave');


subplot(323);
stem(t,x1);
xlabel('time');
ylabel('amp.');
title('dis. sine wave');

y1=cos(2*pi*f*t);
subplot(322);
plot(t,y1);
xlabel('time');
ylabel('amp.');
title('cont. cosine wave');

subplot(324);
stem(t,y1);
xlabel('time');
ylabel('amp.');
title('dis. cosine wave');

z1=conv(x1,y1);
subplot(325);
plot(z1);
xlabel('time');
ylabel('amp.');
title('cont. time convolution');

subplot(326);
stem(z2);
xlabel('time');
ylabel('amp.');
title('dis. time convolution');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run, enter the value of 'n' (numerical). get output :-

Output :-

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...




Generation of Exponential & Ramp signal

Here is a program for generation of exp. and ramp Signal in MAT LAB in continuous and discreet form.

open MAT LAB open new script and paste this program :-

Program :-

-----------------------------------------------------------------------------------------------------------------------


n=input('enter the value of n=');
t=0:0.5:n;
x=exp(t);
subplot(221);
plot(x);
ylabel('amp.');
xlabel('time');
title('cont. exp signal');

subplot(222);
stem(x);
ylabel('amp.');
xlabel('time');
title('dis. exp signal');

y=t;
subplot(223);
plot(y);
ylabel('amp.');
xlabel('time');
title('cont. ramp signal');

subplot(224);
stem(y);
ylabel('amp.');
xlabel('time');
title('dis. ramp signal');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run, enter the value of 'n' (numerical). get output :-

Output :-



IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...


Program for Unit Step Signal

Here is a program for generation of Unit Step Signal in MAT LAB in continuous and discreet form.

open MAT LAB open new script and paste this program :-

Program :-

-----------------------------------------------------------------------------------------------------------------------

n=input('enter any integer value = ');
t=1
x=ones(t,n);
subplot(211);
plot(x);
ylabel('amp.');
xlabel('time');
title('cont. unit step signal');

subplot(212);
stem(x);
ylabel('amp.');
xlabel('time');
title('dis. unit step signal');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run, enter the value of 'n' (numerical). get output :-

Output :-




IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...

Program for elementary signals

Here is a program of MAT LAB for displaying elementary signals like sine and cosine waves in continuous and discreet form.

open MAT LAB open new script and paste this program :-

Program :-
-----------------------------------------------------------------------------------------------------------------------
n=input('enter the value of n=');
t=0:0.02:n;
f=1;
x=sin(2*pi*f*t);
subplot(221);
plot(t,x);
ylabel('amp.');
xlabel('time');
title('cont. sine wave');


subplot(222);
stem(t,x);
xlabel('time');
ylabel('amp.');
title('dis. sine wave');

y=cos(2*pi*f*t);
subplot(223);
plot(t,y);
xlabel('time');
ylabel('amp.');
title('cont. cosine wave');

subplot(224);
stem(t,y);
xlabel('time');
ylabel('amp.');
title('dis. cosine wave');

-----------------------------------------------------------------------------------------------------------------------

just paste the program, press run, enter the value of 'n' (numerical). get output :-

Output :-







IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...

Saturday 27 October 2012

4x4 MATRIX KEYPAD

As you see keypad everywhere like in mobile, in land line telephones, in your computer or in  laptops etc. places.

Here we learn to make 4x4 Matrix Keypad.

Concept :-
                    Concept is very simple. We arrange 16 push buttons in the form of 4x4 matrix. One of Rows or Columns are connected from resistance of 1k ohm and they are connected from ground   or VCC. If you connected them from ground then keypad is works on 0 logic and if you are connected them from VCC then keypad is works on 1 logic. 8 output pins are draw from 4 rows and 4 columns as shown in fig. below :-


Output is in the form of binary digits. When you press one button of keypad then 2 output pin become high.

List of outputs :-


Circuit :-
          
List of components :-
  • push button(4 leg) - 16
  • 5V battery - 1
  • male connector
  • 1k  ohm resistance - 1


Pcb layout :-

bottom view

top view


Note :-
          Here we use 0 logic.

Images :-


top view

bottom view


JUST ENJOY YOUR PROJECT

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK
More embedded projects >>....                             More MAT LAB projects>>...

                  

Thursday 25 October 2012

KNIGHT RIDER LIGHTS

Guys while driving you had seen some lights on the road. They are blinking in a fixed pattern like they are also riding with you. These lights mostly placed at the middle or at the divider side of the road. These lights are called KNIGHT RIDER LIGHTS.




Concept :-
                   Concept of Knight Rider Lights are very similar to the concept of TRAFFIC LIGHT or ELECTRONIC DICE . Only combination of diodes are changed.

4017 counter and 555 timer :-
  


List of components :-
  • 3.3k ohm resistance - 1
  • 8.2k ohm resistance - 1
  • 10k ohm resistance - 1
  • 1k ohm resistance - 6
  • 100k ohm resistance - 1
  • 1N4148 diode - 8
  • 10uf electrolytic capacitor - 1 
  • 0.01uf ceremic capacitor - 1
  • 6.8nf ceremic capacitor - 1
  • LED (any color) - 6
  • 555 timer IC - 1
  • 4017B counter IC - 1
  • 9V battery - 1

Circuit for Traffic Light :-


Note :-
                Do not give more than 9 volts.

Make the above circuit and arrange the LED,s in the form of traffic light and enjoy it.
Pcb layout :-



JUST ENJOY YOUR PROJECT

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK
More embedded projects >>....                             More MAT LAB projects>>...

TRAFFIC LIGHT

Here is one more minor project for you.
While driving you see traffic lights on the road. Now you can make your own traffic light. like below.....

Concept :-
                   
                      Concept of traffic light is very simple. Here is same concept as we discussed in ELECTRONIC DICE. Here 555 timer IC generates the delay among RED, YELLOW and GREEN light and with the help of 4017 counter IC and combinations of diodes we can see the output on RED, YELLOW  and GREEN LED's.

4017 counter and 555 timer :-




List of components :-
  • 22k ohm resistance - 2
  • 10k ohm resistance - 1
  • 1k ohm resistance - 3
  • 100k ohm resistance - 1
  • 1N4148 diode - 6
  • 47uf electrolytic capacitor - 1 
  • 0.01uf ceremic capacitor - 1
  • 6.8nf ceremic capacitor - 1
  • LED (red, yellow, green) - (1,1,1)
  • 555 timer IC - 1
  • 4017B counter IC - 1
  • 9V battery - 1

Circuit for Traffic Light :-


Note :-
                Do not give more than 9 volts.

Make the above circuit and arrange the LED,s in the form of traffic light and enjoy it.

Pcb layout :-

Bottom :-
PRINT THIS IMAGE AS IT IS ON PCB
Top :-



JUST ENJOY YOUR PROJECT

IF YOU HAVE ANY QUERY THAN CONTACT US OR GIVE YOUR QUERY IN THE QUERY OPTION.      
                                                            GOOD LUCK

More embedded projects >>....                             More MAT LAB projects>>...