0% found this document useful (0 votes)
56 views25 pages

Manjit Final PDF

MATLAB INTERNSHIP FILE

Uploaded by

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

Manjit Final PDF

MATLAB INTERNSHIP FILE

Uploaded by

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

A

Summer Entrepreneurship – II

(Industrial Training)
Report On
MATLAB
Submitted in Partial fulfillment of the requirements for
Bachelor of Technology
In
DEPARTMENT OF ELECTRICAL ENGINERRING
SUBMITTED BY
Name: -Manjit Kumar
Reg No.- 22103153906

Submitted to

DEPARTMENT OF ELECTRICAL ENGINEERING


GOVERNMENT ENGINEERING COLLEGE, ARWAL
Shivpur Kaler, Arwal -804429
ACKNOWLEDGEMENT

Theoretical knowledge every student of Engineering


College takes training according to his own branch in a well-
established factory or an organization in which work is
being done practical and how practical work is managed in
normal condition.

I am grateful to Asst. Prof. Deepak Kumar, the Head of


Electrical Department GEC ARWAL for giving me the
permission for training.

The divine support given by our guide Asst. Prof. Santosh


Kumar and Asst. Prof. Neha Kaushik, T.P.O department of
E.E GEC ARWAL, without whom work is not possible.

DESIZNIDEAZ, which helped me a lot and shown the


interest, it gives me great pleasure in presenting my
training report on “MATLAB”.

Manjit Kumar

22103153906

Electrical Engineering

[B.Tech. 3rd Year]


CERTIFICATION

I'm Manjit Kumar, Reg no. 22103153906 Student of B.Tech (EE), 3rd year of
GOVERNMENT ENGINEERING COLLEGE, ARWAL Completed 6 Week Summer
internship from Desiznideaz on 30 January 2024.
During the mentioned period I learned about basics of MATLAB and completed my
Summer internship.

HOD OF E.E
(Deepak Kumar)
(External Examiner)
Internship Supervisor
Department of E.E
GEC, Arwal
ABSTRACT
Software training is one of the requirements to be fulfilled in order to
obtain the Bachelor’s Degree in Technology. Each student needs to do
software training in a recognized company of their respective domain.
The students are compulsory to the training for duration 1 month
which is intended for their exposure to the software industry. A well
planned, properly executed and evaluated software training helps a lot
in developing a professional attitude. It develops an awareness of
software approach to problem solving, based on a broad understanding
of processes. Besides software training build self confidence among
students and let students know the technical knowledge and
professionalism.

During software training, most of the theoretical knowledge gained


during the course of studies was put to test. Various efforts and
processes involved in designing of a component was studied and
understood during the training. In our training I undertook course of
Matlab.

The training gave me good experience from the view of implementing


my theoretical knowledge in practical aspects. It gave me first-hand
experience of working as an engineering professional. It helped me in
improving my technical, interpersonal and communication skills, both
oral and written. Overall, it is a great experience to have software
training in such a reputed firm and I believe that it will help me in
building a successful career.
TABLE OF CONTENTS

 Introduction

 History Of Matlab

 Capabilities Of Matlab

 Benefits of Matlab

 Matlab Screen

 Methods to work in Matlab

 Drawing Units

 Syntax

 Class And Object-Oriented Programming

 Graphics And Graphical User Interface

 Some Commands with Shortcut in Matlab

 Conclusion
 INTRODUCTION TO MATLAB

MATLAB, stands for Matrix Laboratory, is a powerful and versatile


software tool widely used in various fields such as engineering,
mathematics, science, finance, and more. Developed by
MathWorks, MATLAB provides extensive tools and functions that
facilitate data analysis, algorithm development, visualization, and
numerical computations. Its intuitive programming language and
rich interactive environment make it popular among researchers,
engineers, and data scientists. MATLAB was written initially to
implement a simple approach to matrix software developed by the
LINPACK (Linear system package) and EISPACK (Eigen system
package) projects. MATLAB is a modern programming language
environment, and it has refined data structures, includes built-in
editing and debugging tools, and supports object-oriented
programming. MATLAB is multi-paradigm So, it can work with
multiple types of programming approaches, such as Functional,
Object-Oriented, and Visual.
Besides an environment, MATLAB is also a programming language.
As its name contains the word Matrix, MATLAB does its' all
computing based on mathematical matrices and arrays. MATLAB's
all types of variables hold data in the form of the array only, let it be
an integer type, character type or String type variable.

MATLAB is used in various disciplines of engineering,


science, and economics.
 HISTORY OF MATLAB
MATLAB was invented by mathematician and computer
programmer Cleve Moler. The idea for MATLAB was based on
his 1960s PhD thesis. He developed MATLAB's initial linear
algebra programming in 1967 with his one-time thesis advisor,
George Forsythe. This was followed by Fortran code for linear
equations in 1971. Over the years, MATLAB has evolved to
include a wide range of features and toolboxes for various
applications, including signal processing, image processing,
control systems, optimization, and more.

MATLAB, released in 1984, gained popularity in academia; in 1992,


MATLAB Central File Exchange allowed code sharing; Simulink was
introduced in 1993; MATLAB Builder enabled deployment in 1999;
object-oriented support came in 2002; it became available on Mac
OS X in 2005; Parallel Computing Toolbox was introduced in 2010;
MATLAB Online launched in 2014; Deep Learning Toolbox was
introduced in 2017; and in 2020, MATLAB celebrated its 35th
anniversary.

Throughout its history, MATLAB has continued to evolve with new


features, toolboxes, and improvements to meet the needs of
engineers, scientists, and researchers in various fields. Its user-
friendly interface, extensive documentation, and large community of
users have contributed to its widespread adoption in academia,
industry, and research.
 CAPABILITIES OF MATLAB
Before diving into the top features, let's take a closer look
at the broad capabilities of MATLAB. Understanding these
capabilities will provide a foundation for appreciating the
power and versatility of this software tool.

 Math and computation :- MATLAB array provides


a comprehensive set of mathematical functions and
operators, and tools for symbolic and numerical
computation.

 Algorithm development :- MATLAB is a popular


choice for algorithm development, as it allows users to
quickly and easily prototype and test new algorithms.

 Modelling, simulation, and prototyping :- It can


be used to create models of physical systems, simulate the
behavior of those systems, and prototype new software
applications.

 Data analysis, exploration, and visualization


:- It offers a diverse toolkit for data analysis, including
statistical functions, plotting functions, and visualization tools.

 Scientific and engineering graphics :- MATLAB is


a powerful tool for creating scientific and engineering
graphics. It also provides a variety of 2D and 3D plotting
functions, as well as tools for animating and interactively
exploring data.
 Application development :- MATLAB can develop
standalone and web-based, and mobile applications.

These are some of the key capabilities of MATLAB, although it


can do a lot more, like system design, GPU computing,
desktop and web deployment, embedded code generation,
etc. With these capabilities, the potential Uses of MATLAB is
immense.
 FEATURES/BENEFITS OF MATLAB
MATLAB is renowned for its extensive range of features,
making it a versatile and powerful tool for professionals
across different domains. Here are the top 10 Features of
MATLAB that set it apart from other programming
languages and software tools.

1. High-level language

MATLAB employs a high-level programming language that allows


users to express complex mathematical operations and algorithms
concisely. The MATLAB language is designed to resemble
mathematical notation, making it intuitive for users with
mathematical backgrounds to transition into programming. Its
syntax is easy to read and write, promoting efficient code
development and readability.

2. Interactive Environment

One of MATLAB's standout features is its interactive environment. It


provides both the command-line interface
(CLI) and the graphical user interface (GUI), allowing users to
interact with their code and data seamlessly. The command
window enables quick prototyping, data exploration, and iterative
development by providing immediate feedback on computations.
The GUI tools, such as the Editor and Debugger, enhance the
development process, allowing users to write, debug, and test
their code efficiently.

3. Interfacing with different languages


MATLAB supports seamless inter-operability with other
programming languages, including C, C++, Java, Python, and
more. This feature enables users to leverage existing code or
libraries written in different languages within MATLAB, enhancing
its versatility and integration capabilities. It also provides interfaces
and functions to call external code or execute external programs,
facilitating collaboration and code reuse across different language
environments.

4. Mathematical function library


MATLAB offers a vast mathematical function library, providing
users with various optimized functions for various mathematical
operations. For tasks related to signal processing, you can
leverage specialized functions like Matlab Convolation, enhancing
the versatility of MATLAB for a wide range of mathematical
applications.

5. Broad platform compatibility


MATLAB is compatible with major operating systems such as Windows,
macOS, and Linux. This cross-platform support ensures users can

seamlessly transition their projects across different environments


without significant modifications. Whether you're working on a
desktop computer, laptop, or server, MATLAB offers consistent
performance and functionality across platforms.

6. Parallel and distributed computing


MATLAB provides features for parallel and distributed computing
to accelerate computations and handle large-scale data.
MATLAB's Distributed Computing Server and Parallel Computing
Toolbox facilitate efficient parallel processing, making it an ideal
choice for big data analytics and high-performance computing.

7. Machine learning and deep learning


MATLAB offers extensive support for machine learning and deep learning

workflows. It provides a rich set of functions, algorithms, and pre-trained

models that simplify tasks such as data preprocessing, feature extraction,

model training, and deployment. Users can leverage MATLAB's Machine

Learning Toolbox and Deep Learning Toolbox to develop and deploy

advanced machine learning models, even without extensive programming

expertise.

8. Data import/export and connectivity


MATLAB offers comprehensive support for importing and exporting
data in various formats, including spreadsheets, images, audio, video,
and more. It provides functions to read and write data in common file
formats, simplifying data integration and analysis. Additionally,
MATLAB supports connectivity with databases, web services, and
hardware devices, allowing seamless data acquisition and integration
from various sources.

Starting MATLAB
 MATLAB SCREEN
After logging into your account, you can enter MATLAB by double-clicking on the
MATLAB shortcut icon on your Windows desktop. When you start MATLAB, a
special window called the MATLAB desktop appears. The desktop is a window that
contains other windows. The major tools within or accessible from the desktop are:
• The Command Window
• The Command History
• The Workspace
• The Current Directory
• The Help Browser
 METHODS TO WORK IN MATLAB

 DRAWING UNITS
 SYNTAX
The MATLAB application is built around the MATLAB
programming language. Common usage of the MATLAB
application involves using the "Command Window" as an
interactive mathematical shell or executing text files containing
MATLAB code.

TYPES OF SYNTAX
 Variables
Variables are defined using the assignment operator, =. MATLAB is a weakly typed

programming language because types are implicitly converted. It is an inferred typed

language because variables can be assigned without declaring their type, except if they

are to be treated as symbolic objects and that their type can change. Values can come

from constants, from computation involving values of other variables, or from theoutput

of a function. For example:-

>> x = 17

x=
1
x =
7

>> x = 'hat'

x=

hat

>> x = [3*4, pi/2]


12.00001.5708

>> y = 3*sin(x)

y =
-1.6097 3.0000
 Vectors and matrices

A simple array is defined using the colon syntax:


initial: increment: terminator. For instance:

>> array = 1:2:9


array =
13579

defines a variable named array (or assigns a new value to an


existing variable with the name array) which is an array
consisting of the values 1, 3, 5, 7, and 9. That is, the array starts
at 1 (the initial value), increments with each step from the
previous value by 2 (the increment value), and stops once it
reaches (or is about to exceed) 9 (the terminator value).

The increment value can actually be left out of this syntax (along
with one of the colons), to use a default value of 1.

>> ari = 1:5


ari =
12345

assigns to the variable named ari an array with the values 1,2,3,4 and
5, since the default value of 1 is used as the increment.
Indexing is one-based, which is the usual convention for matrices in
mathematics, unlike zero-based indexing commonly used in other
programming languages such as C, C++, and Java.
Matrices can be defined by separating the elements of a row with blank
space or comma and using a semicolon to terminate each row. The list of
elements should be surrounded by square brackets. Paraentheses () are
used to access elements and subarrays (they are also used to donate a
function argument list).

 Structures
MATLAB supports structure data types. Since all variables in MATLAB are
arrays, a more adequate name is "structure array", where each element of
the array has the same field names. In addition, MATLAB supports dynamic
field names (field look-ups by name, field manipulations, etc.).

 Functions
When creating a MATLAB function, the name of the file should match the
name of the first function in the file. Valid function names begin with an
alphabetic character, and can contain letters, numbers, or underscores.
Variables and functions are case sensitive.

 Function handles
MATLAB supports elements of lambda calculus by introducing function
handles, or function references, which are implemented either in .m files or
anonymous/nested functions.
gbImage = imread('ecg.png');

grayImage = rgb2gray(rgbImage); % for non-indexed images level =


graythresh(grayImage); % threshold for convertingimage to binary,

binaryImage = im2bw(grayImage, level);

% Extract the individual red, green, and blue color channels.


redChannel = rgbImage(:, :, 1);

greenChannel = rgbImage(:, :, 2);


blueChannel = rgbImage(:, :, 3);

% Make the black parts pure red.

redChannel(~binaryImage) = 255;

greenChannel(~binaryImage) = 0;
blueChannel(~binaryImage) = 0;
% Now recombine to form the output image.

rgbImageOut = cat(3, redChannel, greenChannel,


blueChannel); imshow(rgbImageOut);
 CLASS AND OBJECT-ORIENTED PROGRAMING

MATLAB supports object-oriented programming including


classes, inheritance, virtual dispatch, packages, pass-by-value
semantics, and pass-by-reference semantics. However, the
syntax and calling conventions are significantly different from
other languages. MATLAB has value classes and reference classes,
depending on whether the class has handle as a super-class (for
reference classes) or not (for value classes).

Method call behavior is different between value and reference


classes. For example, a call to a method:

object.method();

can alter any member of object only if object is an instance of a


reference class, otherwise value class methods must return a new
instance if it needs to modify the object.

An example of a simple class is provided below :

classdef Hello

methods
function greet(obj)
disp('Hello!')
end
end
end
 GRAPHICS AND GRAPHICAL USER INTERFACE

MATLAB has tightly integrated graph-plotting features. For


example, the function plot can be used to produce a graph from
two vectors x and y. The code:

x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)

produces the following figure of the sine function:


MATLAB supports three-dimensional graphics as well:

[X,Y] = [X,Y] =
meshgrid(-10:0.25:10,-10:0.25:10);
meshgrid(-10:0.25:10,-10:0.25:10);
f = sinc(sqrt((X/pi).^2+

(Y/pi).^2)); mesh(X,Y,f); f = sinc(sqrt((X/pi).^2+


axis([-10 10 -10 10 -0.3 1]) (Y/pi).^2)); surf(X,Y,f);
axis([-10 10 -10 10 -0.3 1])
xlabel('{\bfx}')
xlabel('{\bfx}')
ylabel('{\bfy}') zlabel('{\
ylabel('{\bfy}') zlabel('{\
bfsinc} ({\bfR})') hidden off bfsinc} ({\bfR})')

This code produces a This code produces a


wireframe 3D plot of surface 3D plot of the
the two-dimensional two-dimensional
unnormalized sinc unnormalized sinc
function : function
 SOME COMMANDS WITH SHORTCUT IN MATLAB

 Command Window: CTRL+0


 Command History: CTRL+1
 Current Folder: Ctrl+2
 Workspace: CTRL+3
 Profile: CTRL+4
 Figure Palette: CTRL+6
 Plot Browser: CTRL+7
 Piopeity Editor: CTRL+8
 Editor: CTRL+SHIFT+0
 Figures: CTRL+SHIFT+1
 Web browser: CTRL+SHIFT+2
 Variables Editor: CTRL+SHIFT+3
 Comparison tool: CTRL+SHIFT+4
 Help browser: CTRL+SHIFT+5
 CONCLUSION

MATLAB is a versatile software tool that empowers professionals

across diverse fields. With its high-level language, interactive

environment, and seamless integration with other languages,

MATLAB projects offers a wide range of capabilities... Features of

MATLAB include an interactive interface, compatibility with different

languages, and a powerful mathematical function library, which

enables users to perform complex computations, visualize data,

develop algorithms, and more. Whether you're an engineer,

researcher, or data scientist, With the help of MATLAB commands, you

may increase your productivity and open up new avenues for your job.

……………………..

You might also like