Wednesday, 23 October 2013

C Program to Evaluate Functions Using Simpson's Rule


  The Program provided in this post evaluates the definite integrals of sin(x), cos(x) and ex. This program is of no serious use. It simply illustrates the working of Simpson's Rule. Simpson's Rule is a method for numerical integration which helps us to find the numerical approximation of definite integrals like the one shown below.
Click here to view the Wikipedia Article on Simpson's Rule.

Figure Below Shows a Sample Output


C Program to Evaluate Functions Using Trapezoidal Rule


  The following Program evaluates the definite integrals of sin(x), cos(x) and ex. I have to confess that the program does not serve any practical purpose other than illustrating the working of Trapezoidal Rule. Trapezoidal Rule is a technique for approximating the definite integral shown below.
Click here to view the Wikipedia Article on Trapezoidal Rule.

Figure Below Shows a Sample Output

Saturday, 19 October 2013

NS2 : Simulating Link State Routing


  The post provides the NS2 Script (TCL Script) to simulate a wired network using Link State Routing Protocol.

Execution of the Script

Network Topology in NAM

Data Transfer & Link Failure

Data Transfer through Alternate Path

Second Link Fails & Data Transfer through Alternate Path



NS2 : Simulating Distance Vector Routing


  The post provides the NS2 Script (Tcl Script) to simulate a wired network using Distance Vector Routing Protocol.

Execution of the Script

NAM Showing the Network Topology

Data Transfer in NAM

First Link Fails

Data Transfer through Alternate Path

Second Link Fails & Data Transfer through Alternate Path