• Image Processing, Matlab, OOPs Lab Programs, Programming

    Posted on April 29th, 2011

    Written by Geek

    Tags

    Program for image morpholog using Matlab

    Program for image morphology Demonstrate boundary extraction, interior filling   % demonstrate morphological boundary extraction %clear all, close all   A0=imread(’myshap4.bmp’); imshow(A0); % a heart shape hand drawing title(’original image’); pause % A0 contains mostly 1s and the drawing contains 0s, uint8 A1=1-double(A0); % invert black and white   B=ones(3); A2=imopen(imclose(A1,B),B); % fill 1 pixel [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 28th, 2011

    Written by Geek

    Tags

    Algorithm for tree traversal

    Algorithm for tree traversal Preorder(root) If root = null then exit Process root->info Preorder root->left; Preorder root->right Exit Inorder(root) If root = null then exit Inorder root->left Process root->info Inorder root->right Exit Postorder(root) If root = null then exit Postorder root->left Postorder root->right Postorder root->info exit Program Listing   // traversing a tree #include <stdio.h> [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 28th, 2011

    Written by Geek

    Tags

    ALGORITHM TO MERGE TWO SORTED ARRAY

    ALGORITHM TO MERGE TWO SORTED ARRAY ENTER (a[10],n) 1. Repeat step 2 for i = 0 to (n-1) 2. Input a[i] 3. Return DISPLAY(c[20],p) 1. Repeat step 2 for k = 0 to p-1 2. Print c[k] 3. Return MAIN( ) 1. Start st nd 2. Input no. of elements in 1 & 2 array [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 28th, 2011

    Written by Geek

    Tags

    ALGORITHM TO SORT ARRAY USING SELECTION SORT

    ALGORITHM TO SORT ARRAY USING SELECTION SORT steps 1. For (i = 0; i

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 28th, 2011

    Written by Geek

    Tags

    ALGORITHM TO SORT ARRAY USING BUBBLE SORT

    ALGORITHM TO SORT ARRAY USING BUBBLE SORT Steps 1. Repeat steps 2 & 3 for k = 1 to N-1 2. Set ptr =1 3. Repeat while ptr data[ptr + 1],then Interchange data[ptr] and data[ptr + 1] (b) ptr = ptr + 1 5. Exit bubble sort listing   #include <stdio.h> #include <conio.h> void main() [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 28th, 2011

    Written by Geek

    Tags

    ALGORITHM TO EVALUATE POSTFIX EXPRESSION

    ALGORITHM TO EVALUATE POSTFIX EXPRESSION Steps P -> postfix expression breve 1. Add a right parenthesis “)” at the end of P 2. Scan P from left to right and repeat steps 3 & 4 until sentinel “)” is encountered 3. If an operand is encountered, put it on stack 4. If an operator is [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 28th, 2011

    Written by Geek

    Tags

    ALGORITHM TO CONVERT AN INFIX TO POSTFIX EXPRESSION

    ALGORITHM TO CONVERT AN INFIX TO POSTFIX EXPRESSION Note: Q -> arithmetic expression breve P -> postfix expression breve Steps: 1. Push “(“ onto stack, and add “)” to the end of Q 2. Scan Q from left to right and repeat steps 3 to 6 for each element of Q untill the stack is [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 27th, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT QUEUE AS LINKED LIST

    ALGORITHM TO IMPLEMENT QUEUE AS LINKED LIST CREATE 1. t = new node 2. Enter info to be inserted 3. Read n 4. t info = n breve 5. t next = front breve 6. front = t INSERTION 1. r next = t breve 2. t next = NULL breve 3. Return DELETION 1. [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 23rd, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT DOUBLE LINKED LIST

    ALGORITHM TO IMPLEMENT DOUBLE LINKED LIST 1. t = new node 2. Enter “the info to be inserted” 3. Read n 4. t info = n breve 5. t next = NULL breve 6. t prev NULL breve INSERTION BEGIN 1. If start = NULL start = t 2. else t next = NULL breve [...]

    Print Friendly
  • Algorithms, OOPs Lab Programs

    Posted on April 23rd, 2011

    Written by Geek

    Tags

    ALGORITHM TO IMPLEMENT LINKED LIST

    ALGORITHM TO IMPLEMENT LINKED LIST 1. t = newmode( ) 2. Enter info to be inserted 3. Read n 4. t info = n breve 5. t next = start breve 6. Start = t INSERTION BEGIN 1. t next = start breve 2. start = t Return MIDDLE 1. Enter info of the node [...]

    Print Friendly
  • Older Posts Yeah! There are more posts, check them out.

Switch to our mobile site

PHVsPjwvdWw+