Mthimkhuluramasimong
On this page, you find all documents, package deals, and flashcards offered by seller mthimkhuluramasimong.
- 34
- 0
- 1
Community
- Followers
- Following
35 items
(C - Structures)
The slides that follow present a basic introduction to C - structures that we will 
need in order to understand fundamental data structures. 
• Arrays allow us to define types of variables that can hold several data items of the 
same kind. 
• In contrast, structure is an example of user defined data type available in C that allows us to combine data items of different kinds. 
• Structures are used to represent a record. Suppose we want to keep track of our 
books in a library. We might wa...
- Class notes
- • 7 pages •
The slides that follow present a basic introduction to C - structures that we will 
need in order to understand fundamental data structures. 
• Arrays allow us to define types of variables that can hold several data items of the 
same kind. 
• In contrast, structure is an example of user defined data type available in C that allows us to combine data items of different kinds. 
• Structures are used to represent a record. Suppose we want to keep track of our 
books in a library. We might wa...
(Arrays)
A list of finite number of homogenous data elements 
• Data elements could be 
 
§ Characters 
§ Numbers 
§ Structures 
 
Note!: After compilation, elements of array are stored in successive 
memory location 
 
Exception: User defined higher dimensional arrays
- Class notes
- • 17 pages •
A list of finite number of homogenous data elements 
• Data elements could be 
 
§ Characters 
§ Numbers 
§ Structures 
 
Note!: After compilation, elements of array are stored in successive 
memory location 
 
Exception: User defined higher dimensional arrays
(Review on basics of C-language)
// 
// main.c 
// Testing Filter 
// 
// Copyright © 2016 James Okello. All rights reserved. 
 
#include <stdio.h> 
#include "test_c_filter.h" 
 
int main(int argc, const char * argv[]) { 
// insert variables & code here... 
printf("Hello, World!n"); 
test_filter_parameters(); // prototype of this function in header file 
return 0; // return a value if necessary
- Class notes
- • 20 pages •
// 
// main.c 
// Testing Filter 
// 
// Copyright © 2016 James Okello. All rights reserved. 
 
#include <stdio.h> 
#include "test_c_filter.h" 
 
int main(int argc, const char * argv[]) { 
// insert variables & code here... 
printf("Hello, World!n"); 
test_filter_parameters(); // prototype of this function in header file 
return 0; // return a value if necessary
(Graphs & Sample Algorithm)
Given some vector v, it possible to create a number 
(or a set) of vectors that when linearly combined will 
give any vector of a type similar to v 
 
§ Similarly, given a graph, it is possible to create sub- 
graphs that together they define the original graph 
 
ü Note that a graph is constituted of vertices and 
edges
- Class notes
- • 22 pages •
Given some vector v, it possible to create a number 
(or a set) of vectors that when linearly combined will 
give any vector of a type similar to v 
 
§ Similarly, given a graph, it is possible to create sub- 
graphs that together they define the original graph 
 
ü Note that a graph is constituted of vertices and 
edges
(Revisit the big “O”)
Given 
• a matrix variable “matrixA” of type double and size N-by-M (N 
rows and M columns) 
• a vector variable “vectorB” of type double and size M-by-1 
 
Assume the variables vectorB, vectorC and matrixA have been declared 
 
#define SIZE_N 20 
#define SIZE_M 10 
: 
double matrixA[SIZE_N][SIZE_M], vectorB[SIZE_M], vectorC[SIZE_N];
- Class notes
- • 19 pages •
Given 
• a matrix variable “matrixA” of type double and size N-by-M (N 
rows and M columns) 
• a vector variable “vectorB” of type double and size M-by-1 
 
Assume the variables vectorB, vectorC and matrixA have been declared 
 
#define SIZE_N 20 
#define SIZE_M 10 
: 
double matrixA[SIZE_N][SIZE_M], vectorB[SIZE_M], vectorC[SIZE_N];
Introduction to Trees
A non-linear DS used to represent data containing a hierarchical relationship between elements 
- A set of nodes storing elements in a parent-child relationship 
- A data structure which consists of 
a finite set of elements called nodes or vertices 
a finite set of directed arcs which connect the nodes
- Class notes
- • 31 pages •
A non-linear DS used to represent data containing a hierarchical relationship between elements 
- A set of nodes storing elements in a parent-child relationship 
- A data structure which consists of 
a finite set of elements called nodes or vertices 
a finite set of directed arcs which connect the nodes
Broad classification
Input: Zero or more quantities are externally supplied 
• Output: At least one quantity is produced 
• Definiteness: Instructions has to be clear & unambiguous 
• Finiteness: Algorithm must always terminate after a finite set of 
instructions
- Class notes
- • 9 pages •
Input: Zero or more quantities are externally supplied 
• Output: At least one quantity is produced 
• Definiteness: Instructions has to be clear & unambiguous 
• Finiteness: Algorithm must always terminate after a finite set of 
instructions
Introductory definitions
Data structure is a collection of data items in memory 
There is a corresponding number of operations provided to manipulate data 
structures 
 
Data may be organized in many different ways- the logical or mathematical 
model organization of data is also referred to as data structure 
 
• Data refers to a value or a set of values 
These values may represent some observation from experiment, marks 
obtained by a student in an examination, age (i.e. 22), e.t.c.
- Class notes
- • 30 pages •
Data structure is a collection of data items in memory 
There is a corresponding number of operations provided to manipulate data 
structures 
 
Data may be organized in many different ways- the logical or mathematical 
model organization of data is also referred to as data structure 
 
• Data refers to a value or a set of values 
These values may represent some observation from experiment, marks 
obtained by a student in an examination, age (i.e. 22), e.t.c.
Electronic Measurement Systems
Understand basic measurement principles Look at a typical instrumentation system 
Usually some amplification of the sensor signal is needed
- Package deal
- Class notes
- • 13 pages •
Understand basic measurement principles Look at a typical instrumentation system 
Usually some amplification of the sensor signal is needed
References for Digital & Analog Conversion,Real World DACs,Matching Resolution & ExampleS
Wakerly doesn’t cover this section 
For the notes we used Rizzoni, (Principles and Applications of 
Electrical Engineering, Giorgio Rizzoni, 3rd, revised 4th or 5th 
edition) and Tocci/Widmer (Digital Systems – Principles & 
Applications, Ronald J Tocci & Neal S Widmer, 8th edition). 
Copies of Rizzoni are available in the library. 
 
The DAC circuit based on the inverting summer provided a 
useful hypothetical basis for discussion, but is not a practical 
circuit. Why? 
 
An 8-bit DAC has a...
- Package deal
- Class notes
- • 7 pages •
Wakerly doesn’t cover this section 
For the notes we used Rizzoni, (Principles and Applications of 
Electrical Engineering, Giorgio Rizzoni, 3rd, revised 4th or 5th 
edition) and Tocci/Widmer (Digital Systems – Principles & 
Applications, Ronald J Tocci & Neal S Widmer, 8th edition). 
Copies of Rizzoni are available in the library. 
 
The DAC circuit based on the inverting summer provided a 
useful hypothetical basis for discussion, but is not a practical 
circuit. Why? 
 
An 8-bit DAC has a...