You are on page 1of 8

MYANMAR AEROSPACE ENGINEERING UNIVERSITY

Department of Electrical Systems and Instrumentation

Code- EI4001
Week -1
Outlines of Presentation

 Programming Structures
 Relational Operator
 Logical Operator
 References
Programming Structures

can be categorized
sequences – list of commands
selection – based on logical conditions
repetition – executed multiple times

Fig.1 Programming Structures used in MATLAB


Relational Operator

Fig.2 Relational Operator


Logical Operator

Fig.3 Logical Operator


Logical Function

find – searches a matrix and identifies which elements in that matrix meet a
given criterion
eg;
find(a>40)
[r,c]=find(a>40)
[r,c,v]=find(a>40)
Selection Structures

Simple if
if comparison
state
end

if/else structure
if comparison
state
else
state
end

elseif
References

1. Title – MATLAB for Engineers


ISBN - 978-0-13-210325-1
2. Title – MATLAB An Introduction with Applications
ISBN - 978-0-470-76785-6
3. Title – MATLAB- A Practical Introduction to Programming
and Problem Solving
ISBN - 978-0-12-804525-1

You might also like