














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Programs in matlab for the queeing models
Typology: Exams
1 / 22
This page cannot be seen from the preview
Don't miss anything!
th
Affiliated to PTU, & Approved by AICTE
Syllabus
Affiliated to PTU, & Approved by AICTE
MATLAB is widely used in all areas of applied mathematics, in education and research at universities, and in the industry. MATLAB stands for MATrix LABoratory and the software is built up around vectors and matrices. This makes the software particularly useful for linear algebra but MATLAB is also a great tool for solving algebraic and differential equations and for numerical integration. MATLAB has powerful graphic tools and can produce nice pictures in both 2D and 3D. It is also a programming language, and is one of the easiest programming languages for writing mathematical programs. MATLAB also has some tool boxes useful for signal processing, image processing, optimization, etc.
the "MATLAB" submenu. From the "MATLAB" submenu, choose "MATLAB".
You can quit MATLAB by typing exit in the command window.
MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include:
Math and computation Algorithm development Modeling, simulation, and prototyping Data analysis, exploration, and visualization Scientific and engineering graphics Application development, including Graphical User Interface building
MATLAB is an interactive system whose basic data element is an array that does not require dimensioning. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar noninteractive language such as C or Fortran. The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects, which together represent the state-of-the-art in software for matrix computation.
Experiment 1
MATLAB has evolved over a period of years with input from many users. In university
environments, it is the standard instructional tool for introductory and advanced courses in
mathematics, engineering, and science. In industry, MATLAB is the tool of choice for high-
productivity research, development, and analysis.
MATLAB features a family of application-specific solutions called toolboxes. Very important to
most users of MATLAB, toolboxes allow you to learn and apply specialized technology.
Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. Areas in which toolboxes are
available include signal processing, control systems, neural networks, fuzzy logic, wavelets,
simulation, and many others.
The MATLAB System
The MATLAB system consists of five main parts:
This is a high-level matrix/array language with control flow statements, functions, data
structures, input/output, and object-oriented programming features. It allows both "programming
in the small" to rapidly create quick and dirty throw-away programs, and "programming in the large" to create complete large and complex application programs.
This is the set of tools and facilities that you work with as the MATLAB user or programmer. It
includes facilities for managing the variables in your workspace and importing and exporting
data. It also includes tools for developing, managing, debugging, and profiling M-files, MATLAB's applications.
This is the MATLAB graphics system. It includes high-level commands for two-dimensional and
three-dimensional data visualization, image processing, animation, and presentation graphics. It
also includes low-level commands that allow you to fully customize the appearance of graphics
as well as to build complete Graphical User Interfaces on your MATLAB applications.
This is a vast collection of computational algorithms ranging from elementary functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse,
matrix eigenvalues, Bessel functions, and fast Fourier transforms.
This is a library that allows you to write C and Fortran programs that interact with MATLAB. It
include facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT-files.
3-pi
Affiliated to PTU, & Approved by AICTE
Experiment 3
Affiliated to PTU, & Approved by AICTE
Experiment 4
Affiliated to PTU, & Approved by AICTE
OPNET provides a discrete event simulation engine. MATLAB is software for numerical calculations and provides communication engineers with a vast library for implementing communication systems such as channel models and beam forming algorithms. By integrating MATLAB simulation with OPNET we are able to reuse the beam forming algorithms developed in MATLAB and analyze their performance and effect on the upper layers (specifically, data link and network layers) of the communication system. This would be difficult to realize without a discrete event simulator. In this thesis, we have interfaced MATLAB and OPNET so as to reuse the antenna beam steering algorithms, which were developed in MATLAB, and use the graphics library of MATLAB to provide the capability to observe the dynamic changes in the antenna patterns during simulation execution. For interfacing OPNET and MATLAB, we made use of the MX interface provided by MATLAB, which allows C programs to call functions developed in MATLAB. This is illustrated in Figure 3.1. For calling MATLAB functions the user needs to include following files in the bind_shobj_libs environment attribute.
The directory where the above files are present is included in bind_shobj_flags. After including the necessary files into the include path, the MATLAB engine is started by OPNET simulation at the beginning of the simulation by using the function engOpen(). This provides the OPNET simulation with a pointer to a memory location that can be us ed to pass MATLAB commands to the MATLAB engine. The engine pointer can be shared among different processes by declaring
Experiment 6
the engine pointer in a header file common to all process models. Variables can be exchanged between OPNET and MATLAB using functions engPutArray() and engGetArray(). Network Modeling Using OPNET
OPNET is among the leading discrete event network simulators used both by the commercial and research communities. It provides a comprehensive framework for modeling wired as well as wireless network scenarios Simulation models are organized in a hierarchy consisting of three main levels: the simulation network, node models and process models. The top level refers to the simulation scenario or simulation network. It defines the network layout, the nodes and the configuration of attributes of the nodes comprising the scenario. OPNET ModelerTM uses an object-oriented approach for the development of models and simulation scenarios. The models can be identified as a CLASS , which can be reused any number of times in the simulation by creating its different instantiations, just like the creation of objects in any object-oriented programming language. Besides allowing the creation of multiple instances, OPNET allows the user to extend the functionality of the basic models already available as part of the model library. Thus, by defining the value of the attributes of the basic model the user can develop customized models following particular standards or vendor specifications.
Affiliated to PTU, & Approved by AICTE
Program
#ifndef SIMULATION
#include
#include
#include
#include
Experiment 7
Available methods include:
Interpolation and regression Differentiation and integration Linear systems of equations Fourier analysis Eigenvalues and singular values Ordinary differential equations (ODEs) Sparse matrices
MATLAB add-on products provide functions in specialized areas such as statistics, optimization, signal analysis, and machine learning.
Refinement of gridded data using 2-D cubic interpolation.
Data Analysis and Visualization
MATLAB provides tools to acquire, analyze, and visualize data, enabling you to gain insight into your data in a fraction of the time it would take using spreadsheets or traditional programming languages. You can also document and share your results through plots and reports or as published MATLAB code.
Acquiring Data
MATLAB lets you access data from files, other applications, databases, and external devices. You can read data from popular file formats such as Microsoft Excel; text or binary files; image,
sound, and video files; and scientific files such as netCDF and HDF. File I/O functions let you work with data files in any format.
A mixed numeric and text file for import into MATLAB using the Import Tool. MATLAB
automatically generates a script or function to import the file programmatically.
Using MATLAB with add-on products, you can acquire data from hardware devices, such as your computer's serial port or sound card, as well as stream live, measured data directly into MATLAB for analysis and visualization. You can also communicate with instruments such as oscilloscopes, function generators, and signal analyzers.
Analyzing Data
MATLAB lets you manage, filter, and preprocess your data. You can perform exploratory data analysis to uncover trends, test assumptions, and build descriptive models. MATLAB provides functions for filtering and smoothing, interpolation, convolution, and fast Fourier transforms (FFTs). Add-on products provide capabilities for curve and surface fitting, multivariate statistics, spectral analysis, image analysis, system identification, and other analysis tasks.
MATLAB program (left) published as HTML (right) using the MATLAB Editor. Results that
display in the Command Window or as plots are captured and included, and the code comments
are turned into section
Programming and Algorithm Development
MATLAB provides a high-level language and development tools that let you quickly develop and analyze algorithms and applications.
Key Features Numeric Computation Data Analysis and Visualization
Programming and Algorithm Development Application Development and Deployment
Programming and Algorithm Development
MATLAB provides a high-level language and development tools that let you quickly develop and analyze algorithms and applications.
The MATLAB Language
The MATLAB language provides native support for the vector and matrix operations that are fundamental to solving engineering and scientific problems, enabling fast development and execution.
With the MATLAB language, you can write programs and develop algorithms faster than with traditional languages because you do not need to perform low-level administrative tasks such as declaring variables, specifying data types, and allocating memory. In many cases, the support for
vector and matrix operations eliminates the need for for-loops. As a result, one line of MATLAB code can often replace several lines of C or C++ code.
MATLAB provides features of traditional programming languages, including flow control, error handling, and object-oriented programming (OOP). You can use fundamental data types or advanced data structures, or you can define custom data types.
A communications algorithm that generates 1024 random bits, converts the vector to a
transmitted signal, adds complex Gaussian noise, and plots the result in nine lines of MATLAB
code.
You can produce immediate results by interactively executing commands one at a time. This approach lets you quickly explore multiple options and iterate to an optimal solution. You can capture interactive steps as scripts and functions to reuse and automate your work.
MATLAB add-on products provide built-in algorithms for signal processing and communications, image and video processing, control systems, and many other domains. By combining these algorithms with your own, you can build complex programs and applications.
Development Tools
MATLAB includes a variety of tools for efficient algorithm development, including:
Command Window - Lets you interactively enter data, execute commands and programs, and display results MATLAB Editor - Provides editing and debugging features, such as setting breakpoints and stepping through individual lines of code Code Analyzer - Automatically checks code for problems and recommends modifications to maximize performance and maintainability MATLAB Profiler - Measures performance of MATLAB programs and identifies areas of code to modify for improvement
Additional tools compare code and data files, and provide reports showing file dependencies, annotated reminders, and code coverage.