SlideShare a Scribd company logo
1 of 21
TOPIC:- STRUCTURE ARRAYS
Presented by :
 About MATLAB
 Arrays
 Types of arrays
 Structure arrays
 Creating structures
 Structure functions
 Program
 Accessing structure arrays
 Summary
 MATLAB (matrix laboratory) is a fourth-generation high-level
programming language and interactive environment for
numerical computation.
 MATLAB is widely used as a computational tool in science
and engineering encompassing the fields of physics ,
chemistry, math and all engineering streams.
It is a range of applications including:
• Signal processing and communications
• Control systems
• Computational biology
 It is started developing MATLAB in
the late 1970s.
 CLEVE MOLER , the chairman of the
computer science department at the
university of New Mexico .
 Moler and Steve Bangert together
rewrote MATLAB in ‘C’ and founded
Math works in 1984 to continue its
development.
CLEVE MOLER
STEVE BANGERT
 One of the strength of MATLAB is the capability to handle
collections of items , called ARRAYS ,as if they were a single
entity.
 The array-handling feature means that MATLAB programs
can be very short.
 The array is the basic building block in MATLAB.
 Numeric array
 Character array
 Logical array
 Cell array
 Structure array
 Function handle array
 Java array
 Structure arrays are composed of structures.
 Numeric, character and cell arrays all reference the individual
elements by number.
 Structures reference individual elements within each row
(called “fields”) by name.
 To access these fields, the dot “.” notation is used.
 Assignment is as follows:
Structurename.Fieldname = datatype;
 Let’s create a simple structure:
>>Person . first name = ‘ramesh’;
Person .Last name = ‘ babu ’;
Person.Address1 = ‘china’;
Person . city = ‘america’;
Person . state = ‘US’;
Person . Zip = ‘30332-0001
 >>person=
first name: ’Ramesh’
last name: ’Babu’
address1:’china’
city : ‘America’
state : ‘US’
Zip: ‘30332-0001’
By creating simple structure then type in command window
person that will display above result i.e is related to
person details . Person(1) also gives same information.
 s= struct(‘f1’,’v1’,’f2’,’v2’,...)
creates a structure array with the fields ‘f1’,’f2’,…
having the values ‘v1’,’v2’,...
Ex:
>>s= struct(‘type’,{‘big’,’little’},’color’,’red’,’x’,{3 4})
s=1x2 struct array with the fields:
type
color
x
.
.
 names=fieldnames(s)
Return the fields names associated with the
structure array S as names , a cell array of strings.
Ex: >>names=fieldnames(s)
names=‘type’
‘color’
‘x’
 isfield(s,’field’)
returns 1 if ‘field’ is the name of a field in the
structure array s and 0 otherwise.
Ex: >>isfield(s,’field’)
ans=0
>>isfield(s,{‘type’,’color’,’x’})
ans=1 1 1
 isstruct(s)
Returns 1 if the array s is a structure array and 0
otherwise
Ex: >>isstruct(s)
ans=1
 s=rmfield(s,’field’)
removes the field ‘field’ from the structure
array s
 Ex: >>s=rmfield(s,’type’)
s=1x2 struct array with fields:
color
x
These are the structure functions and there
descriptions.
 c=structure2cell(s)
converts structure array to cell array.
Ex: >>clear s, s.category=‘tree’;s.height=37.4;
s.name=‘bamboo’;
>>c=struct2cell(s)
c= ‘tree’
[37.4000]
‘bamboo’
>>f=fieldnames(s)
f=‘category’
‘height’
‘name’
 s=cell2struct(c,fields,dim)
converts cell array to structure array.
Here dim means dimensions . c means cell array.
Ex: >>c={‘tree’,37.4,’bamboo’};
f={‘catgeory’,’height’,’name’};
s=cell2struct(c,f,2)
s=
category : ’tree’
height : 37.4000
name : ‘bamboo’
Student . Name . first = ‘kusu’;
student.name . last = ‘kalyan’;
Student . score = 82.39;
Student . grade = ‘B’;
student(2).name . first = ‘Anna’;
student(2).name . last = ‘Tom’;
student(2).score = 94.50;
Student(3).name . first = ‘Jerry’
 The structure arrays can be accessed as :
Ex: >>student . score
ans=82.39
Student(1) score is also similar to that of student.
We can replace the contents of the student by
giving changed information.
Ex:>>student .grade=‘A’;
>>student . grade
ans=A
 By using MATLAB structure arrays can be created ,
accessed easily.
 MATLAB handles vector and matrices very nice . It
is an interpreted language.
 Quick plotting and analysis . It is an interactive
environment.
 Matrix based-handle and manipulate large data sets .
But it is slow compared to C or Java .
 If you want to learn Matlab Webtunix Solutions is one of the
best Artificial Intelligence Company in Chandigarh
who is working on Intelligent Web Frameworks Such as
MATLAB, Python, Hadoop, Big Data and Java.
 Here is the list of some companies which uses these MATLAB
Toolboxes and job roles offered by them:-
General Electric - (Job role)Controls Engineer
 Caterpillar - (Job role) Engineer - Model Based Developer
 Cyient - (Job role) System Engineer
Continental AG - (Job role) HIL Simulation Engineer
 Alstom Limited - (Job role) Control engineer
 Boeing International Corporation India Private
Limited - (Job role) Navigation and control engineer
 The MathWorks - (Job role) Automative system
engineer
 Satyam-Venture Engineering Services Private Limited
- (Job role) System modelling and system engineer
 Satyam-Venture Engineering Services Private Limited
- (Job role) Control engineer - Mechatronics
 ABB Group - Automation company - (Job role )
Domain test engineer
 DRDO - Defence Research and Development
Organization - (job role) Application support engineer
Structure Arrays

More Related Content

What's hot

Data structure
Data structureData structure
Data structureMohd Arif
 
C Programming: Structure and Union
C Programming: Structure and UnionC Programming: Structure and Union
C Programming: Structure and UnionSelvaraj Seerangan
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueGhaffar Khan
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersAbdul Rahman Sherzad
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2Self-Employed
 
Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1Kumar
 
Structures and Pointers
Structures and PointersStructures and Pointers
Structures and PointersPrabu U
 
Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structureeShikshak
 
Coates p: the use of genetic programing in exploring 3 d design worlds
Coates p: the use of genetic programing in exploring 3 d design worldsCoates p: the use of genetic programing in exploring 3 d design worlds
Coates p: the use of genetic programing in exploring 3 d design worldsArchiLab 7
 
DBMS Question bank
DBMS Question bankDBMS Question bank
DBMS Question bankSara Sahu
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure NUPOORAWSARMOL
 
data structure
data structuredata structure
data structurehashim102
 
Coates p: the use of genetic programming for applications in the field of spa...
Coates p: the use of genetic programming for applications in the field of spa...Coates p: the use of genetic programming for applications in the field of spa...
Coates p: the use of genetic programming for applications in the field of spa...ArchiLab 7
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListIntroduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListSelvaraj Seerangan
 
Day 5b statistical functions.pptx
Day 5b   statistical functions.pptxDay 5b   statistical functions.pptx
Day 5b statistical functions.pptxAdrien Melquiond
 

What's hot (20)

Data structure
Data structureData structure
Data structure
 
Structure in C
Structure in CStructure in C
Structure in C
 
R Datatypes
R DatatypesR Datatypes
R Datatypes
 
C Programming: Structure and Union
C Programming: Structure and UnionC Programming: Structure and Union
C Programming: Structure and Union
 
Introductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, QueueIntroductiont To Aray,Tree,Stack, Queue
Introductiont To Aray,Tree,Stack, Queue
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Computer Science-Data Structures :Abstract DataType (ADT)
Computer Science-Data Structures :Abstract DataType (ADT)Computer Science-Data Structures :Abstract DataType (ADT)
Computer Science-Data Structures :Abstract DataType (ADT)
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2
 
Data structure lecture 1
Data structure lecture 1Data structure lecture 1
Data structure lecture 1
 
Algo>Abstract data type
Algo>Abstract data typeAlgo>Abstract data type
Algo>Abstract data type
 
Structures and Pointers
Structures and PointersStructures and Pointers
Structures and Pointers
 
Introduction of data structure
Introduction of data structureIntroduction of data structure
Introduction of data structure
 
Coates p: the use of genetic programing in exploring 3 d design worlds
Coates p: the use of genetic programing in exploring 3 d design worldsCoates p: the use of genetic programing in exploring 3 d design worlds
Coates p: the use of genetic programing in exploring 3 d design worlds
 
DBMS Question bank
DBMS Question bankDBMS Question bank
DBMS Question bank
 
Data structure
Data structureData structure
Data structure
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
 
data structure
data structuredata structure
data structure
 
Coates p: the use of genetic programming for applications in the field of spa...
Coates p: the use of genetic programming for applications in the field of spa...Coates p: the use of genetic programming for applications in the field of spa...
Coates p: the use of genetic programming for applications in the field of spa...
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListIntroduction to Data Structures and Linked List
Introduction to Data Structures and Linked List
 
Day 5b statistical functions.pptx
Day 5b   statistical functions.pptxDay 5b   statistical functions.pptx
Day 5b statistical functions.pptx
 

Similar to Structure Arrays

Similar to Structure Arrays (20)

Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Dsp file
Dsp fileDsp file
Dsp file
 
EE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manualEE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manual
 
Mit202 data base management system(dbms)
Mit202  data base management system(dbms)Mit202  data base management system(dbms)
Mit202 data base management system(dbms)
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
 
Matlab Overviiew
Matlab OverviiewMatlab Overviiew
Matlab Overviiew
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
The Very ^ 2 Basics of R
The Very ^ 2 Basics of RThe Very ^ 2 Basics of R
The Very ^ 2 Basics of R
 
MATLAB guide
MATLAB guideMATLAB guide
MATLAB guide
 
Get started with R lang
Get started with R langGet started with R lang
Get started with R lang
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Matlab Manual
Matlab ManualMatlab Manual
Matlab Manual
 
Matlab OOP
Matlab OOPMatlab OOP
Matlab OOP
 
interfacing matlab with embedded systems
interfacing matlab with embedded systemsinterfacing matlab with embedded systems
interfacing matlab with embedded systems
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
 
Matlab lecture
Matlab lectureMatlab lecture
Matlab lecture
 
Bca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structureBca ii dfs u-1 introduction to data structure
Bca ii dfs u-1 introduction to data structure
 
Bsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structureBsc cs ii dfs u-1 introduction to data structure
Bsc cs ii dfs u-1 introduction to data structure
 

Recently uploaded

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Recently uploaded (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Structure Arrays

  • 2.  About MATLAB  Arrays  Types of arrays  Structure arrays  Creating structures  Structure functions  Program  Accessing structure arrays  Summary
  • 3.  MATLAB (matrix laboratory) is a fourth-generation high-level programming language and interactive environment for numerical computation.  MATLAB is widely used as a computational tool in science and engineering encompassing the fields of physics , chemistry, math and all engineering streams. It is a range of applications including: • Signal processing and communications • Control systems • Computational biology
  • 4.  It is started developing MATLAB in the late 1970s.  CLEVE MOLER , the chairman of the computer science department at the university of New Mexico .  Moler and Steve Bangert together rewrote MATLAB in ‘C’ and founded Math works in 1984 to continue its development. CLEVE MOLER STEVE BANGERT
  • 5.  One of the strength of MATLAB is the capability to handle collections of items , called ARRAYS ,as if they were a single entity.  The array-handling feature means that MATLAB programs can be very short.  The array is the basic building block in MATLAB.
  • 6.  Numeric array  Character array  Logical array  Cell array  Structure array  Function handle array  Java array
  • 7.  Structure arrays are composed of structures.  Numeric, character and cell arrays all reference the individual elements by number.  Structures reference individual elements within each row (called “fields”) by name.  To access these fields, the dot “.” notation is used.  Assignment is as follows: Structurename.Fieldname = datatype;
  • 8.  Let’s create a simple structure: >>Person . first name = ‘ramesh’; Person .Last name = ‘ babu ’; Person.Address1 = ‘china’; Person . city = ‘america’; Person . state = ‘US’; Person . Zip = ‘30332-0001
  • 9.  >>person= first name: ’Ramesh’ last name: ’Babu’ address1:’china’ city : ‘America’ state : ‘US’ Zip: ‘30332-0001’ By creating simple structure then type in command window person that will display above result i.e is related to person details . Person(1) also gives same information.
  • 10.  s= struct(‘f1’,’v1’,’f2’,’v2’,...) creates a structure array with the fields ‘f1’,’f2’,… having the values ‘v1’,’v2’,... Ex: >>s= struct(‘type’,{‘big’,’little’},’color’,’red’,’x’,{3 4}) s=1x2 struct array with the fields: type color x . .
  • 11.  names=fieldnames(s) Return the fields names associated with the structure array S as names , a cell array of strings. Ex: >>names=fieldnames(s) names=‘type’ ‘color’ ‘x’  isfield(s,’field’) returns 1 if ‘field’ is the name of a field in the structure array s and 0 otherwise.
  • 12. Ex: >>isfield(s,’field’) ans=0 >>isfield(s,{‘type’,’color’,’x’}) ans=1 1 1  isstruct(s) Returns 1 if the array s is a structure array and 0 otherwise Ex: >>isstruct(s) ans=1  s=rmfield(s,’field’) removes the field ‘field’ from the structure array s
  • 13.  Ex: >>s=rmfield(s,’type’) s=1x2 struct array with fields: color x These are the structure functions and there descriptions.
  • 14.  c=structure2cell(s) converts structure array to cell array. Ex: >>clear s, s.category=‘tree’;s.height=37.4; s.name=‘bamboo’; >>c=struct2cell(s) c= ‘tree’ [37.4000] ‘bamboo’ >>f=fieldnames(s) f=‘category’ ‘height’ ‘name’
  • 15.  s=cell2struct(c,fields,dim) converts cell array to structure array. Here dim means dimensions . c means cell array. Ex: >>c={‘tree’,37.4,’bamboo’}; f={‘catgeory’,’height’,’name’}; s=cell2struct(c,f,2) s= category : ’tree’ height : 37.4000 name : ‘bamboo’
  • 16. Student . Name . first = ‘kusu’; student.name . last = ‘kalyan’; Student . score = 82.39; Student . grade = ‘B’; student(2).name . first = ‘Anna’; student(2).name . last = ‘Tom’; student(2).score = 94.50; Student(3).name . first = ‘Jerry’
  • 17.  The structure arrays can be accessed as : Ex: >>student . score ans=82.39 Student(1) score is also similar to that of student. We can replace the contents of the student by giving changed information. Ex:>>student .grade=‘A’; >>student . grade ans=A
  • 18.  By using MATLAB structure arrays can be created , accessed easily.  MATLAB handles vector and matrices very nice . It is an interpreted language.  Quick plotting and analysis . It is an interactive environment.  Matrix based-handle and manipulate large data sets . But it is slow compared to C or Java .
  • 19.  If you want to learn Matlab Webtunix Solutions is one of the best Artificial Intelligence Company in Chandigarh who is working on Intelligent Web Frameworks Such as MATLAB, Python, Hadoop, Big Data and Java.  Here is the list of some companies which uses these MATLAB Toolboxes and job roles offered by them:- General Electric - (Job role)Controls Engineer  Caterpillar - (Job role) Engineer - Model Based Developer  Cyient - (Job role) System Engineer Continental AG - (Job role) HIL Simulation Engineer  Alstom Limited - (Job role) Control engineer
  • 20.  Boeing International Corporation India Private Limited - (Job role) Navigation and control engineer  The MathWorks - (Job role) Automative system engineer  Satyam-Venture Engineering Services Private Limited - (Job role) System modelling and system engineer  Satyam-Venture Engineering Services Private Limited - (Job role) Control engineer - Mechatronics  ABB Group - Automation company - (Job role ) Domain test engineer  DRDO - Defence Research and Development Organization - (job role) Application support engineer