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.
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.
An assignment is as follows:
Structure name.Fieldname = datatype;
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.
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.
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.
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