Monday, November 22, 2010

0

matlab program for amplitude modulation

  • Monday, November 22, 2010
  • tech
  • PROGRAM

    % amplitude modulated wave

    n=0:100;
    m=0.3;fm=0.01;fc=0.1;
    xm=sin(2*pi*fm*n);
    xc=sin(2*pi*fc*n);
    y=(1+m*xm).*xc;
    stem(n,y);        
    grid;
    xlabel('time index n');
    ylabel('amplitude');


    OUTPUT
     



    Read more...
    0

    MATLAB SIMULINK PROGRAM FOR DISCRETE SINE WAVE

  • tech




  • SINE WAVE
    SOURCES->SINE WAVE

    SOURCE BLOCK PARAMETERS

    SCOPE
    SIMULINK->SINK->SCOPE
    CLICK ON PARAMETER ICON ON SCOPE DISPLAY
    GENERAL
    AXES:NO OF AXES:1
    TIME RANGE:AUTO
    SPECTRUM SCOPE
    SIGNAL PROCESSING BLOCKSET->SINKS->SPECTRUM SCOPE
    SET THE PROPERTIES AS SHOWN BELOW



    CLICK ON SIMULATION ICON ON MODEL WINDOW AND OBSERVE OUTPUT

    OUTPUT

    Read more...
    0

    MATLAB SIMULINK PROGRAM FOR CONTINOUS SINE WAVE

  • tech
  • BLOCK DIAGRAM



    PARAMETERS


    SINE WAVE
    SOURCES->SINE WAVE


    SIMULINK->SINK->SCOPE
    CLICK ON PARAMETER ICON ON SCOPE DISPLAY
    GENERAL
    AXES:NO OF AXES:1
    TIME RANGE:AUTO
    CLICK ON SIMULATION ICON ON MODEL WINDOW AND OBSERVE OUTPUT

    SOURCE BLOCK PARAMETERS



    OUTPUT


    Read more...
    0

    MATLAB SIMULINK PROGRAM FOR SINE SQUARED WAVE(WAVEFORM MULTIPLICATION)

  • tech
  • SETUP
    SPECTRUM
    Read more...

    Wednesday, November 17, 2010

    0

    MATLAB PROGRAM FOR Ramp continous and discrete

  • Wednesday, November 17, 2010
  • tech
  • PROGRAM


    % ramp continous and discrete
    n=0:.1:10;
    subplot(211);         %breaks figure window into 2*1 matrix and select 1st axis for current plot
    plot(n,n);                %plotting the value of n against n for getting ramp signal
    title('ramp continous');          
    xlabel('time');
    ylabel('amplitude');
    subplot(212);          %breaks figure window into 2*1 matrix and select 2nd axis for current plot
    stem(n,n);               %discrete plot
    title('ramp discrete');          
    xlabel('time');
    ylabel('amplitude');

    OUTPUT 

    Read more...
    0

    MATLAB PROGRAM FOR Ramp Discrete GENERATION

  • tech
  • PROGRAM

    % ramp discrete
    n=0:.1:10;
    stem(n,n);                %discrete plote the value of n against n for getting ramp signal
    title('ramp discrete');          
    xlabel('time');
    ylabel('amplitude');


    OUTPUT 

    Read more...
    0

    MATLAB PROGRAM FOR Ramp continous generation

  • tech
  • PROGRAM

    % ramp continous
    n=0:.1:10;
    plot(n,n);                %plotting the value of n against n for getting ramp signal
    title('ramp continous');          
    xlabel('time');
    ylabel('amplitude');

    OUTPUT 

    Read more...
    0

    Step Wave Continous and Discrete

  • tech
  • PROGRAM

    % step discrete and continous
    n=ones(1,20);         % creates an array of 20 elements with value 1;
    x=0:1:19;
    subplot(211);        %breaks figure window into 2*1 matrix and select 1st axis for current plot
    stem(x,n);              %discrete step wave
    title('discrete step');
    xlabel('time');
    ylabel('amplitude');
    subplot(212);    %breaks figure window into 2*1 matrix and select 2nd axis for current plot
    plot(x,n);              %continous sine wave
    title('continous step');
    xlabel('time');
    ylabel('amplitude');

    OUTPUT 



    Read more...
    0

    matlab program for Step Wave Discrete

  • tech
  • PROGRAM

    % step discrete
    n=ones(1,20);         % creates an array of 20 elements with value 1;
    x=0:1:19;              
    stem(x,n);      %discrete step wave
    title('continous step');
    xlabel('time');
    ylabel('amplitude');



    Read more...
    0

    MATLAB program for Step Wave Continous generation

  • tech
  • PROGRAM

    % step continous
    n=ones(1,20);         % creates an array of 20 elements with value 1;
    x=0:1:19;              
    plot(x,n);      %continous step wave
    title('continous step');
    xlabel('time');
    ylabel('amplitude');

    OUTPUT 


    Read more...
    0

    matlab program for sine wave generation(Continous and discrete)

  • tech
  • Program

    % continous sine wave
    t=0:.1:10;                                   %create an array t 
    a=input('enter the amplitude');
    f=input('enter the frequency');
    y=a*sin(2*pi*f*t);                      %calculation of sine wave
    plot(t,y);                                     %plot the value of t against y
    title('continous sinewave');      % title of the graph
    xlabel('time');
    ylabel('amplitude');



    output





    % discrete sine wave
    clc;                                         %clear command window
    t=0:.1:10;                               %create an array t starting from 0 and .1 is the increment and 10 final value
    a=input('enter the amplitude');
    f=input('enter the frequency');
    y=a*sin(2*pi*f*t);                    %calculation of sine wave
    stem(t,y);                                 %discrete plot the value of t against y
    title('discrete sinewave');         % title of the graph
    xlabel('time');
    ylabel('amplitude');



    OUTPUT


    Read more...
    0

    MATLAB Program to Add 2 Numbers.

  • tech
  • Lets Write a simple program to add two Programs
    As i had already discussed you can either execute program in the Command Window or save a program as .m file.
    1) Executing a program in a Command Window

    Just select the Command Window and write the necesary codes as shown below


    The figure shows how to add 2 numbers.
    Here i have used two variables x and y
    just write in the command window x='any value say 2' and y='say2'
    then write x+y and press enter.
    You wil get Result 4 in the command window as shown above
    Simple Huh!
    But for larger programs it is neccessary to save the program.


    Program to add two numbers using text editor

    Select Text Editor by using the Following Step


    Select file menu


    >select New


    >select .m file


    >type the program name and save the file and type the program code


    NOTE:We can write comments between the codes using the % symbol.just type % and write the codes


    Here Goes the Program


    clc; %clear command window
    x=input(' x='); %accept tha value of x
    y=input(' y='); %accept tha value of y
    z=x+y;
    disp('z='); %display function inbuilt in matlab to display a string
    disp(z); %display the value of z




    Read more...
    0

    Introduction to MATLAB

  • tech
  • MATLAB(MATrixLABoratory) is a high speed software designed to solve complex engineering problems within a second! It covers all sections of Electronics such as SignalProcessing,Control System,Image Processing,Communication and lot more! It has separate toolboxes for performing this functions.It has many inbuilt functions to perform the complex calculations.In short,MATLAB makes Engineering Computing Easier!
    Read more...