This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VHDL code: | |
| library IEEE; | |
| use IEEE.STD_LOGIC_1164.ALL; | |
| use IEEE.STD_LOGIC_ARITH.ALL; | |
| use IEEE.STD_LOGIC_UNSIGNED.ALL; | |
| -- Uncomment the following lines to use the declarations that are | |
| -- provided for instantiating Xilinx primitive components. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<conio.h> | |
| #define MAX 6 | |
| typedef struct stack | |
| { | |
| int data[MAX]; | |
| int top; | |
| }stack; | |
| void init(stack *); | |
| int empty(stack *); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Program details: | |
| Various operations like read,insert,delete,print,sort,modify for student database | |
| */ | |
| #include <stdio.h> | |
| #include <conio.h> | |
| #include <string.h> | |
| typedef struct student | |
| { int rollno; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Port1 pins P1.24 to P1.31 and the these pins are configured as General Purpose output pins. | |
| #include<lpc2148.H> //LPC2148 Header | |
| void delay() | |
| { | |
| for(int i=0x00;i<=0xff;i++) | |
| for(int j=0x00;j<=0xFf;j++) ; // Delay program | |
| } | |
| void main() | |
| { | |
| PINSEL2 = 0X00000000; // Set P1.24 TO P1.31 as GPIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<conio.h> | |
| #include<math.h> | |
| #include<string.h> | |
| #include<graphics.h> | |
| struct fh | |
| { | |
| unsigned int bftype; | |
| unsigned long bfsize; | |
| unsigned int bfreserved1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<conio.h> | |
| #include<process.h> | |
| #include<math.h> | |
| #include<iostream.h> | |
| #include<stdlib.h> | |
| #include<graphics.h> | |
| void plot_axis(int type); | |
| void plot_histo(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clc;clear all;close all; | |
| img = imread('circles.png'); | |
| id = double(img); | |
| [row col] = size(id); | |
| SE = [1 1 1;1 1 1;1 1 1]; | |
| for i = 2:1:row-1 | |
| for j = 2:1:col-1 | |
| array = [SE(1)*id(i-1,j-1) , SE(2)*id(i-1,j) , SE(3)*id(i-1,j+1) , SE(4)*id(i,j-1) , SE(5)*id(i,j) , SE(6)*id(i,j+1) , SE(7)*id(i+1,j-1) , SE(8)*id(i+1,j) , SE(9)*id(i+1,j+1)]; | |
| dil(i,j) = max(array); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clc | |
| I=imread('cameraman.tif'); | |
| [m n]=size(I); | |
| a=im2double(I); | |
| for i=1:m-2 | |
| for j=1:n-2 | |
| v(i,j) = [a(i,j) + a(i,j+1) + a(i,j+2) + a(i+1,j) + a(i+1,j+1) + a(i+1,j+2) + a(i+2,j) + a(i+2,j+1) + a(i+2,j+2)]./9; %smoothing filter | |
| x(i,j) = [0*a(i,j) + 1*a(i,j+1) + 0*a(i,j+2) + 1*a(i+1,j) + -4*a(i+1,j+1) + 1*a(i+1,j+2) + 0*a(i+2,j) + 1*a(i+2,j+1) + 0*a(i+2,j+2)]; %high pass filter | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<string.h> | |
| struct MOTtable | |
| { | |
| char Mnemonic[6]; | |
| int Class; | |
| char Opcode[3]; | |
| }; | |
| struct symboltable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<conio.h> | |
| #include<stdlib.h> | |
| #include<string.h> | |
| struct MNT | |
| { | |
| char mname[20]; | |
| int mdtp; |
NewerOlder