Module 1
Module 1
ALGORITHM
Algorithm is a systematic logical approach which is a well-defined, step-by-step procedure that
allows a computer to solve a problem.
1. Request the number of sheets of paper; call is Sheets. (input)
2. Divide Sheets by 5. (processing)
3. Round the quotient up to the next highest whole number; call is Stamps. (processing)
4. Reply with the number Stamps. (output)
FLOWCHART SYMBOLS
Symbols Name Meaning
Flowline Used to connect symbols and indicate the flow of logic.
DIVIDE-AND-CONQUER METHOD
• Used in problem-solving – take a large problem and break it into smaller problems solving the small
ones first.
• Breaks a problem down into modules.
STATEMENT STRUCTURES
• Sequence – follow instructions from one line to the next without skipping over any lines.
• Decision – if the answer to a question is “Yes” then one group of instructions is executed. If the
answer is “No,” then another is executed.
• Looping – a series of instructions are executed over and over.
SEQUENCE FLOWCHART
DECISION FLOWCHART
LOOPING FLOWCHART
Chapter 2: Introduction to MATLAB: Familiarization of the Interface