0% found this document useful (0 votes)
5 views

Experiment No. A: Software Should Be Installed On PC. Theory

The document discusses MATLAB simulation software and its basics like starting and quitting MATLAB, desktop tools, command window, workspace, file operations, importing and exporting data, and demonstrations. Key tools on the MATLAB desktop are the command window, command history, launch pad, current directory browser, help browser, workspace browser, array editor, and editor/debugger.

Uploaded by

spareadd.23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Experiment No. A: Software Should Be Installed On PC. Theory

The document discusses MATLAB simulation software and its basics like starting and quitting MATLAB, desktop tools, command window, workspace, file operations, importing and exporting data, and demonstrations. Key tools on the MATLAB desktop are the command window, command history, launch pad, current directory browser, help browser, workspace browser, array editor, and editor/debugger.

Uploaded by

spareadd.23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

EXPERIMENT NO.

AIM - Introduction to MATLAB simulation software.

APPARATUS - MATLAB software should be installed on PC.

THEORY -:
BASICS OF MATLAB

MATLAB is a language of technical computing. The MATLAB development environment is a set of tools
to help user use MATLAB functions and files. Many of these tools are graphical user interface.

STARTING AND QUITTING MATLAB

To start MATLAB on Microsoft Windows platform, double-click MATLAB shortcut icon on your windows
desktop.

To quit MATLAB at any time, do one of the following:

• Select close box in MATLAB desktop

• Select exit MATLAB from desktop file menu

• Type quit at command window prompt. DESKTOP TOOLS Desktop is thought of as your instrument
panel for MATLAB. When you start MATLAB, desktop appears containing tools (GUI) for managing files,
variables and applications associated with MATLAB.

MATLAB Desktop -:

The following tools are managed by the MATLAB DESKTOP:

• Command Window- Run MATLAB functions


• Command History- View a log of functions you entered in the command window, copy them, and execute
them.

• Launch Pad- Run tools and access documentation for all of your MathWorks Products

• Current Directory Browser- View MATLAB files and related files and perform file operations such as
open, and find content.

• Help Browser- View and search documentation for the full family of MATLAB products.

• Workspace Browser- View and make changes to the contents of workspace

• Array Editor- View array contents in a table format and edit values

• Editor/Debugger- Create, edit and debug M-files

THE COMMAND WINDOW

The command window is the main way you communicate with MATLAB. It appears in the desktop when
you first start MATLAB. Use command window to run MATLAB functions and MATLAB operations.

MATLAB WORKSPACE

The MATLAB workspace consists of the set of variables built up during a MATLAB session and stored in
memory. You add variables to the workspace by using functions, running M-files and loading saved
workspaces.

Use workspace browser to perform operations on the MATLAB workspace.

FILE OPERATIONS:

MATLAB file operations use the current directory as a reference point. Any file you want to run must either
be in the current directory or on the search path. The key tools for performing file operations are

• Current Directory Field


• Current Directory Browser
IMPORTING AND EXPORTING DATA

MATLAB provides many ways to load data from disk files or the clipboard into the workspace, a process
called Importing data, and to save workspace variables to a disk file, a process called exporting data. You
can import/export both text data and binary data. The easiest way to import the data is to use MATLAB
Import Wizard.

MATLAB provides following toolboxes:


1. Control System Toolbox
2. Filter Design Toolbox
3. Fuzzy Logic Toolbox
4. Image Processing Toolbox
5. Signal Processing Toolbox
6. Neural Networks Toolbox
7. Partial Differential Equation Toolbox
8. Statistics Toolbox
9. Mapping Toolbox
10. LMI Control Toolbox
11. Optimization Toolbox
12. Robust Control Toolbox
13. Wavelet Toolbox
14. Instrument Control Toolbox
15. System Identification Toolbox
16. Communication Toolbox

Demonstrations:
MATLAB provides very powerful Demonstrations for almost everything in the software. To start demo you
have to use demo command. It’s syntax is:

Type "demo" at the command line to browse available demos.

With the optional action argument demo

('matlab'|'toolbox'|'simulink'|'blockset'|'stateflow'),

DEMO opens the demo screen to the specified subtopic.

With the optional categoryArg argument,

DEMO opens to the specified toolbox or category, e.g.

• demo toolbox signal


• demo matlab language
• The starting Demo Screen looks as follows:
The starting Demo Screen looks as follows:

You have to select the topic whose demo is required from the left panel and click Run.

Some commonly used basic MATLAB commands are: To learn more about each command type help in the
command window.

ver - MATLAB, SIMULINK, and toolbox version information.


help - M-file help, displayed at the command line.
helpwin - M-file help, displayed in the help browser.
demo - Run demonstrations. who - List current variables.
workspace- Display Workspace Browser, a GUI for managing workspace.
clear - Clear variables and functions from memory.
quit - Quit MATLAB session.
type - List M-file.
edit - Edit M-file.
echo - Echo commands in M-files.
format - Set output format.
error - Display error message and abort function.
warning - Display warning message.

RESULT – MATLAB simulation software has been studied successfully.


EXPERIMENT NO. 7

AIM- To study and implement the Discrete Fourier Transform of a Sequence.

APPARATUS - Matlab software should be installed on PC.

THEORY - The Discrete Fourier Transform (DFT) is a mathematical technique used in signal
processing and mathematics to analyse and manipulate signals and data in the frequency
domain. It is the discrete counterpart of the continuous Fourier Transform and is widely
used in various fields, including image processing, audio analysis, and communications.

The DFT takes a discrete sequence of numbers (often representing a signal sampled at
discrete points in time) and transforms it into another sequence of complex numbers,
representing the signal's frequency components. The formula for the DFT of a sequence
x[n] of N samples is given by:

N−1
X[k] = ∑n=0 x[n]⋅e−j(2π/N)kn , k=0,1,2,…,N−1

In this formula:
• X[k] represents the kth frequency component (complex number) of the signal.
• x[n] is the input sequence.
• N is the total number of samples in the sequence.
• j represents the imaginary unit.
• The sum is taken over all values of n from 0 to N−1.
In the context of the Discrete Fourier Transform (DFT), a "twiddle factor" refers to the
complex exponential term that is used to weight the input data or output coefficients when
performing the DFT or its inverse, the Inverse Discrete Fourier Transform (IDFT). The
twiddle factor is used to rotate and scale the values in the DFT computation.

The formula for the twiddle factor is usually given as:

WNk = e(-2πi / N)k

DFT -> X[k]= N−1∑n=0 x[n].W Nkn


CODE-:

OUTPUT - :

OUTPUT PLOT -:

RESULT – Discrete Fourier Transform of a sequence has been studied and implemented
successfully.
EXPERIMENT NO. 8
AIM- To study and implement the Inverse Discrete Fourier Transform of a Sequence.

APPARATUS - Matlab software should be installed on PC.

THEORY - The Discrete Fourier Transform (DFT) is a mathematical technique used in signal
processing and mathematics to analyse and manipulate signals and data in the frequency
domain. It is the discrete counterpart of the continuous Fourier Transform and is widely
used in various fields, including image processing, audio analysis, and communications.

The Inverse Discrete Fourier Transform (IDFT) is a fundamental operation in signal


processing used to transform a frequency-domain representation of a signal back into its
time-domain representation. It is the inverse operation of the Discrete Fourier Transform
(DFT).

The IDFT takes this frequency-domain representation and converts it back into the time-
domain signal. Mathematically, the IDFT can be represented as follows:
N−1
X[n] = 1/N ∑n=0 x[k]⋅ej(2π/N)kn

In this formula:
• X[k] represents the kth frequency component (complex number) of the signal.
• x[n] is the input sequence.
• N is the total number of samples in the sequence.
• j represents the imaginary unit.
• The sum is taken over all values of n from 0 to N−1.

In the context of the Discrete Fourier Transform (DFT), a "twiddle factor" refers to the
complex exponential term that is used to weight the input data or output coefficients when
performing the DFT or its inverse, the Inverse Discrete Fourier Transform (IDFT). The
twiddle factor is used to rotate and scale the values in the DFT computation.

The formula for the twiddle factor is usually given as:

WNk = e(-2πi / N)k

N−1
IDFT -> X[n]=1/N ∑n=0 x[k].W N-kn
CODE -:

OUTPUT -:

OUTPUT PLOT-:

RESULT – Discrete Fourier Transform of a sequence has been studied and implemented
successfully.
EXPERIMENT NO. 9

AIM- To study and implement the Fast Fourier transform of a sequence.

APPARATUS – MATLAB software should be installed on PC.

THEORY - The Fast Fourier Transform (FFT) is an efficient algorithm for computing the
Discrete Fourier Transform (DFT) and its inverse, the Inverse Discrete Fourier Transform
(IDFT). The FFT is widely used in various applications, including signal processing, data
analysis, image processing, and more, due to its significant speed improvements over the
straightforward DFT calculation, especially for large data sets.

Key features and properties of the FFT include:

• Speed: The primary advantage of the FFT is its computational efficiency. It reduces
the number of arithmetic operations required to compute the DFT from O(N^2) (for
the straightforward DFT) to O(N log N) operations, where N is the number of data
points. This substantial reduction in computation time is especially crucial for real-
time and high-performance applications.
• Divide-and-Conquer Approach: The FFT algorithm employs a divide-and-conquer
strategy to split the DFT into smaller DFTs, allowing for recursive calculation and a
reduction in the number of operations.

CODE -:
CODE continued –:

OUTPUT-:

OUTPUT PLOT-:

RESULT – Fast Fourier Transform of a sequence has been studied and implemented
successfully.
EXPERIMENT NO. 10
AIM- To study target detection using radar via correlation

APPARATUS – MATLAB software should be installed on PC.

THEORY - Radar target detection via correlation involves analysing received radar signals to
identify the presence of targets. In MATLAB, this is achieved by generating a radar
waveform, simulating target echoes, adding noise and clutter, and applying matched
filtering (correlation) to enhance target signals.

Here's a general overview of how target detection using radar via correlation works:

1. Signal Transmission:

• Radar systems transmit radio frequency (RF) signals towards a specific area.

2. Signal Reflection:

• When the RF signals encounter objects in their path, they reflect back to the radar
receiver.

3. Received Signal Processing:

• The radar receiver processes the received signals, which may contain information
about the distance, speed, and direction of potential targets.

4. Correlation Processing:

• Correlation is used to compare the received signals with a reference signal or


template.

• The reference signal could be a known radar signature or a waveform that is


expected from a target.

• Correlation measures the similarity between the received signal and the reference
signal.

5. Thresholding:

• A threshold is set to determine whether the correlation result indicates the presence
of a target.

• If the correlation result surpasses the threshold, it suggests the presence of a target.

6. Target Identification:

• Once a potential target is detected, additional processing may be performed to


identify the type of target and extract relevant information.
CODE -:

OUTPUT -:

RESULT – Target detection using radar via correlation successfully designed.

You might also like