0% found this document useful (0 votes)
20 views4 pages

Exp No 00

introduction to MATLAB and Simulink

Uploaded by

Kanij Fatema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

Exp No 00

introduction to MATLAB and Simulink

Uploaded by

Kanij Fatema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1

Date:21.05.2024

Experiment No: 00

Experiment Name: Getting familiarized with MATLAB and Simulink.

Objective: Gaining experience with MATLAB and Simulink is the aim of this experiment.

Theory: MATLAB stands for Matrix Laboratory. It is a high-performance language that is


used for technical computing. It was developed by Cleve Molar of the company MathWorks.
Including in the year 1984.It is written in C, C++, Java. It allows matrix manipulations, plotting
of functions, implementation of algorithms and creation of user interfaces.

Introduction to MATLAB

It is a programming environment as well as a programming language. It permits statements to


be calculated directly within the command window.

Command Window: This window allows quick prototyping of small, easily executable
programs by typing and immediately executing statements, which cannot be saved.

Editor script: The Editor (Script) window allows for the execution of larger programs with
multiple statements and complex functions, saved in the '.m' file extension.

Workspace: The Workspace window displays the values of variables created during the
program's editor course.

Command History window : The Command History window displays a log of statements
executed in current and previous MATLAB sessions, including the time, date, and statements
from each session, as well as the exact path of the program file being created.

MATLAB Library offers inbuilt functions for mathematical operations like sine, cosine, and
tangent, as well as complex functions like matrix inverse and determinant. Despite being
encoded in C, C++, and Java, MATLAB is easier to implement, providing an alternative for
vector operations and eliminating multiple statements.

Basic Functions in MATLAB


Function Description
The values or the text printed within single quotes is displayed on the output
disp() screen
clear To clear all variables
close all To close all graphics window
clc To clear the command window
exp(x) To compute the exponential value of x to the base e
abs(x) To compute the absolute value of x
sqrt(x) To compute the square root of x
log(x) To compute the logarithmic value of x to the base e
log10(x) To compute the logarithmic value of x to the base 10
rem(x, y) To compute the remainder of x/y
sin(x) To compute the sine of x
2

cos(x) To compute the cosine of x


tan(x) To compute the tangent of x
atan2(x, y) To compute the arctangent or inverse of y/x
Main Features and Capabilities of MATLAB

The diagram in the figure shows the main features and capabilities of MATLAB.

MATLAB offers built-in functions for linear algebra computations, data analysis, signal
processing, optimization, and numerical solutions of differential equations. It supports an
external interface for running programs and allows users to write their own functions in the
MATLAB language. MATLAB also provides optional "toolboxes" for primary applications
like symbolic computations, image processing, statistics, control system design, and neural
networks. Its built-in functions are optimized for vector functions, making them faster.

MATLAB System

The MATLAB systems consist of five main elements:

♦ Development Environment
♦ MATLAB Mathematical Function Library
♦ MATLAB Language
♦ Graphics
♦ MATLAB External Interfaces/API

Introduction to Simulink

Simulink is the platform for Model-Based Design that supports system-level design, simulation,
automatic code generation, and continuous test and verification of embedded systems.
3

Simulink is a graphical programming language tool developed by MathWorks for modeling,


simulating, and analyzing dynamic systems. It is a data flow diagramming tool with
customizable block libraries, allowing for the incorporation of MATLAB algorithms into
models and exporting simulation results for further analysis.

Key features of Matlab Simulink include:

Block Diagram Environment: Simulink uses a block diagram approach to model systems.
Users can drag and drop blocks representing different components and connect them to
simulate the behavior of the entire system.

Simulation and Analysis: Simulink allows users to simulate the behavior of models and
analyze the results. It supports various solvers for different types of systems, and users can
visualize simulation results using built-in tools.

Model-Based Design: It enables model-based design, where the system can be designed,
simulated, and tested in a virtual environment before actual implementation. This helps in
identifying and fixing design issues early in the development process.
Automatic Code Generation: Simulink supports automatic code generation for embedded
systems. Models developed in Simulink can be converted into C code for deployment on
hardware such as microcontrollers and DSPs.

Integration with MATLAB: Simulink seamlessly integrates with MATLAB, allowing users
to combine the power of MATLAB's computational capabilities with Simulink's modeling and
simulation environment.

Getting Started with Simulink:

Creating a Model: Start by opening Simulink and creating a new model. Drag and drop blocks
from the library browser to represent the components of your system.

Connecting Blocks: Connect the blocks using lines to define the flow of data between
components. Each block represents a mathematical operation, signal processing function, or
system component.

Simulation: Configure the simulation settings and run the simulation to observe the behavior
of the system over time.

Analysis: Use tools within Simulink to analyze the simulation results, such as plotting signals,
calculating system responses, and identifying system characteristics.

Refinement and Optimization: Iterate our model, refining it based on simulation results to
optimize system performance and behavior.

Matlab Simulink is continuously evolving to meet the demands of modern engineering


practices, making it a powerful tool for system modeling, simulation, and design across various
industries. Its rich feature set and integration capabilities make it a valuable asset for engineers
and researchers working on complex systems and control applications.
4

Component: 1. PC

2. MATLAB

Result and Discussion: MATLAB is a powerful tool for numerical computation, data analysis,
and algorithm development. Its ease of use, extensive library of functions, and visualization
capabilities make it a popular choice for engineers, scientists, and researchers across different
disciplines.

User Interface of MATLAB

Simulink is a powerful tool for engineers and scientists to design and simulate complex systems
efficiently. It provides a visual and intuitive way to model dynamic systems, making it a
valuable tool for system design and analysis.

User Interface of Simulink Commonly Used Blocks

Conclusion: This experiment provided a strong basis for future MATLAB and Simulink
exploration and application.

You might also like