Posts

Showing posts from January, 2014

MATLAB program for Amplitude Modulation

Image
To implement Amplitude modulation using  MATLAB . just follow simple step given below [1]  Open MATLAB and goto FILE -> NEW -> M-FILE . [2]  Write code in that M-file given below. fc=10 fm=1 t=0:0.01:5 x=sin(2*pi*fc*t) y=sin(2*pi*fm*t) g=(1+y).*x h=(1+(.8)*y).*x i=(1+(1.3)*y).*x

MATLAB program to find Frequency Modulation

Image
All right in this post i will tell you about how to get frequency modulation using MATLAB software.To find a frequency modulation using MATLAB. just follow simple step as given below. [1] . Open a MATLAB software. Then click on New -> M-file [2]. Write this code into it. t=0:0.001:1; fm=3; fc=50; b=10; x=sin(2*pi*fm*t); subplot(3,1,1) plot(t,x) y=cos(2*pi*fc*t); subplot(3,1,2) plot(t,y)

MATLAB program to find convolution of two signals

Image
This is a MATLAB program to find convolution of two signal.TO do this just follow simple step given below. [1] Open MATLAB and click on File -> New -> [2] Write a code in that m-file which is given below. t=0:0.1:100; x=sin(t); h=cos(t); subplot(2,2,1)       plot(x) subplot(2,2,2) plot(h) n1=length(x); n2=length(h); X=[x,zeros(x, n2)]; H=[h,zeros(h,n1)]; for i=1: n1+n2-1 y(i)=0; for j=1:n1 if(i-j+1>0) y(i)= y(i)+X(j)*H(i); end

Find Fourier transform of signal and amplitude and phase spectra of it using matlab

Image
 To Find Fourier transform of signal and amplitude and phase spectra of it using Matlab Follow simple step : [1] Open a MATLAB and goto file -> New -> M-file [2] write this code in your M-file : Ts=1/64; T0=4; N0=T0/Ts; t=0:Ts:Ts*(N0-1) ;                                                 t=t'; g=Ts*exp(-2 *t); g(1)=Ts*0.5; G=fft(g);

why do we need to study integration ?

Image
                                    Why do we need to study Integration ? →In this post my task is to get familiar with application of integration so that you guys get knowledge that how integration is helpful in engineering.after reading this post you need to study integration in detail.now read this post carefully. →  we know the relationship including the rate of change of two variables, but we may need to know the direct relationship between the two variables.Let us take one example so that you can understand this easily, we may know the velocity of  an object at a particular time, but we may want to know the position of the object at that time.   →  To find this direct relationship, we need to use the process which is opposite to differentiation.This is called   integration. →  Actually integration is nothing but the summing up of a lot, some million  and million items. depending upon the span you want to integrate.

MAT LAB program to find & plot pdf and cdf for the case of 3 dice roll and compare it with gaussian curve

Image
%MAT LAB program to find & plot pdf and cdf for the case of 3 dice roll and compare it with Gaussian curve clc; clear all(); n=10000; s1= ceil(6*rand(1,n)); s2= ceil(6*rand(1,n)); s3= ceil(6*rand(1,n)); %find pdf  s=s1+s2+s3;    % s=sum of every possibility z=3:1:18;          % z=total possible possibility subplot(2,2,1); hist(s,z); [x y]=hist(s,z); y1=x/n; subplot(2,2,2); bar(z,y1); hold on; %find cdf  y2=cumsum(y1); subplot(2,2,3); bar(z,y2) %find Gaussian curve for same