Lab-1: Familiarization with MATLUB and their base function 

Objective: 

  • To Introduce MATLAB
  • How to draw Sine & Cos Wave
  • How to draw Multi Wave

 

Introduction:


MATLAB  means a software package for high-performance mathematical computation, visualization, and programming environment. MATLAB  provides an proactive environment with hundreds of built-in functions for technical computing, graphics, and animations. MATLAB stands for Matrix Laboratory.




Simulink is a MATLAB-based graphical programming environment for modeling, simulating and analyzing multidomain dynamical systems

Simulink is a block diagram environment for multidomain simulation and Model-Based Design. It supports system-level design, simulation, automatic code generation, and continuous test and verification of embedded systems. Its primary interface is a graphical block diagramming tool and a customizable set of block libraries.

We  going to write the program in MATLAB .First we install the MATLAB and OPEN. Then we click the Newsfeed and Open the Editor Option and Start write the program.




On the Editor , in the Section , select Run and Advance. Run the code in the selected section, and then run all the code after the selected section. On the Editor , in the section, select Run to End. Run to a specific line of code and pause.


Program:

Program-01: Plotting a sine wave



                                                         Figure: Output Wave


Program-02: Plotting a cos wave




                                                             Figure: Cos Output Wave


Program-03: Plotting two graph



Discussion:

The plot function has different forms, depending on the input arguments. If y is a vector, plot(y) produces a piecewise linear graph of the elements of y versus the index of the elements of y. If you specify two vectors as arguments, plot(x,y) produces a graph of y versus x.


Result:

We got output from the Program.