DNA Cryptography: July 2015

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/279978777

DNA Cryptography

Research · July 2015


DOI: 10.13140/RG.2.1.4892.5289

CITATIONS READS
0 6,837

1 author:

Ahsan Omer
Hitec University
3 PUBLICATIONS   6 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Design of Air Conditioner Controller using Fuzzy Logic View project

All content following this page was uploaded by Ahsan Omer on 11 July 2015.

The user has requested enhancement of the downloaded file.


DNA Cryptography
Algorithms and Applications

Submitted By:
Ahsan Omer 14-MS-EE-015
Muhammad Imran Farooq 14-MS-EE-113

2/7/2015
Dedication
This project report is dedicated
to our Mentors and Teachers
who played very important role
in our well being

1|Page
Table of Contents

Chapters Pages
1. Introduction 3
1.1 DNA-The Lifeline 3
1.2 Steganography and Cryptography 3
1.3 DNA Cryptography 5
1.4 Why DNA Cryptography 5

2. Literature Review 6
2.1 Ancient Techniques 6
2.2 Modern Techniques 6

3. Problem Statement 10

4. Implementation 11

5. Results 14

References 17

List of Figures

Figures Pages
1.1 DNA Structure 3
1.2 Private Key Cryptography 4
1.3 Public Key Cryptography 4
2.1 Triple Helical Tile 7
2.2 DNA Layer Model 7
2.3 Encryption using Lookup Table 9
2.4 AES Encryption using DNA key 9
4.1 Encryption of Plaintext 12
4.2 Decryption of Enciphered Text 13
5.1 Matlab GUI 14
5.2 GUI Showing Input and OTP 15
5.3 Encryption of Special Characters 16

List of Tables

Table page
2.1 DNA Lookup Table 8

2|Page
Abstract: This report presents the use of DNA computing in cryptography for secure communications.
There are now several algorithms for DNA cryptography. The discussed algorithm uses One Time Pad
encryption scheme. One time pad key is obtained using DNA bases. DNA lookup table has also been
used for increasing the security of cipher text. The implementation is done on matlab and is working as
expected.

1. Introduction
1.1 DNA –The Lifeline
DNA stands for deoxyribonucleic acid. DNA shapes living organisms. It stores all the information about
the body features of any organism. It is unique for each individual. DNA is the polymer made of
monomers called deoxyribo-nucleotides. Each nucleotide is made of deoxyribose sugar, phosphate
group and nitrogenous base. Nitrogenous bases are of two types purines (adenine and guanine) and
pyrimidines (cytosine and thymine). These bases are represented as A (adenine), G (guanine), C
(cytosine) and T (thymine). A bonds with T and G bonds with C. These bases and bonding play an
important role in DNA processes like DNA computing and DNA cryptography. Bioinformatics play very
important role in DNA computing and DNA cryptography. The definition of Bioinformatics is: “The
mathematical, statistical and computing methods that aim to solve biological problems using DNA and
amino acid sequences and related information [1]”.

Figure 1.1 DNA structure

1.2 Steganography and Cryptography


In this information rich era, there is an immense need to hide the personnel information. This
information may include bank transactions, business deals and other such things. In order to make data

3|Page
secure two techniques are commonly used namely steganography and cryptography. Steganography
involves hiding the data like slicing the least significant bits of bytes of an image to store the secret data
without any noticeable change in the image. While in cryptography, various techniques have been used
to make the data unintelligible to adversaries. In cryptography a key is used for enciphering and
deciphering of data. Cryptography is further divided into two categories. Symmetric cryptography (or
private key cryptography), in which the same key is used for encryption and decryption. The other is

Figure 1.2 Private Key Cryptography

asymmetric cryptography (or public key cryptography), in which there are two keys. Public key is used
for encryption while private key is used for decryption. The key used for encryption is made public
because it cannot be abused easily like trapdoor function.

Figure 1.3 Public Key Cryptography

4|Page
1.3 DNA and Cryptography
DNA cryptography involves enciphering the plaintext using DNA computational techniques. Most of the
cryptographic algorithms involve a large memory and computations like, One Time Pad in which there
are non-repeating very large text pads, this technique will be very useful. A gram of DNA contains 10 21
DNA bases and can store 108 terabytes of memory [2]. One trillion bits of binary data can be stored in
one cubic decimeter of DNA solution [3].Moreover DNA based computations take very less time
compared to other algorithms. The task of any cryptography algorithm is to secure the data for very
large duration of time. In this technique, bases of DNA are arranged in random order and plaintext bits
can be stored successfully using these bases. As this technique employs one time pad which is perfectly
random cryptographic technique, the data can be secured for very long periods of time. In addition to
memory, DNA molecules show parallel computation, which means DNA based processes are capable of
intense processing. DNA chains have large scale of parallelism and its computing speed could reach up
to 1 billion times per second computations [3]. DNA based computers also have very less power
consumption, which is equal to one – billionth of a traditional computer [3].

1.4 Why DNA Cryptography


This is the century of information explosion and information has become very important strategic
resource particularly when it comes to large corporations. That is why the security of information or
data becomes very important. With the advancements of information technology and development of
new techniques, the threats of eavesdropping faced by sender and the receiver have been increased.
Software has been developed to break DES, AES and other modern security algorithms. DES has also
been broken by molecular computer proposed by Boneh et al and Molecular Sticker algorithm proposed
by Zhihua Chen et al indicating the capabilities of molecular computing (of DNA) [4]. Although the
cryptographic techniques ensure the security of systems, the attacker comes up with new methods to
crack or hack the system. Hence to make sure that the information reaches the intended persons usually
sender and the receiver, all the weaknesses of security systems must be overcome. A security system
may have many weak spots like the place where the ciphers are stored. DNA cryptography solves such
problems and gives hope of developing unbreakable algorithms. The data is secured either inside the
DNA (hiding messages in DNA microdots [5]) or using DNA sequences to create encrypted text which can
only be decrypted if the key or correct sequence (of DNA bases) is known. There is another technique of
generating encrypted text, which uses chromosomal indexing after XORing the plaint text with bits of
one time pads. This indexing and the sequence of one time pad used will give the plain text from
encrypted text.

5|Page
2. Literature Review
2.1 Ancient Techniques
The science of securing important messages and information from outsiders is very old. The two
methods used for data security are steganography and cryptography. Steganography was used by
Histiaeus in 5th century BC. He sent his messages by tattooing shaved head of a slave and sending him as
a carrier when the hair grew back [6]. As for the cryptographic methods of data security many ciphers
had developed like Ceaser Cipher, One Time Pad Cipher, Transposition Cipher and many more.

2.2 Modern Techniques


There are several cryptographic algorithms like AES, DES and RSA, which are used for securing data from
eavesdroppers. Steganography is used in slicing least significant bits for hiding the information. As far as
the DNA cryptography is concerned, the Pioneering work is done by Ashish Gehani et al and Amin et al
after L. M. Adleman showed the capability of molecular computation in 1994 [7].

Ashish Gehani et al used DNA cryptography technique using one time pad. They implemented DNA
cryptography using two techniques; DNA cryptosystem using substitution and DNA cryptosystem using
XOR OTP. The latter technique has been discussed here. For XORing the message bits with OTP random
bits, the Vernam Cipher [9] has been used. Now suppose S is the sequence of R uniformly distributed
bits known as a one-time pad. Sender and the receiver have the copy of sequence S. L is the number of
bits of S that have not been used for encrypting a message. Two binary inputs give 0 if they are same,
when they are XORed and give 1 if they are different. When a plain text binary message has to be sent,
each bit has to b XORed with the bits of sequence S. If M is the message and C is the ciphered message
then Ci = Mi XOR Si where i = 1,2,…..n. After encryption the cipher text is sent. At the receiver’s end, the
same sequence S will be used to decrypt the cipher text to obtain the plain text. Cipher text C is XORed
with bit sequence of S to obtain the plain text i. e. Mi = Ci XOR Si. To implement Vernam Cipher using
DNA molecules, the following steps are required.

i. Encipher the message


ii. Create one time pad using DNA
iii. Realization of XOR operation

These operations are realized using DNA tiling implementation. In this tiling long chains of inputs and
outputs are created. DNA tiles are multi-strand complexes which have two or more double helical
domains in a way that individual oligonucleotide chains might base pair in one helix then cross over and
base pair in another helix. Complexes involving cross overs create tiles which are thermally stable.

6|Page
Figure 2.1 Triple Helical Tiles

The tiles are designed in a way that they make binary strings by assembling linearly. Two binary input
strings can be assembled linearly using special connector tiles. These tiles are assembled in a way that
output string tile can also be fit with them. These processes are carried out in the presence of special
enzymes. After this process, there exists a strand which runs through the entire assembly. This strand
contains two input strings and an output string.

Now assume that a1, a2….an and a1’, a2’…… an’ are input bits for XOR operation. The bits a1, a2…an are the
bits of plaintext whereas a1’, a2’….an’ are the bits of one time pad. The same sequence of one time pad
bits is stored at both sender and the receiver’s place. After various sequences, the input portion of the
structure came into existence. This structure has been shown in the figure below. The pair of tiles of
input assembly arranges itself in a way that a slot for single output tile is formed. When the output slot
is formed, the bits of output tile bind themselves to the appropriate sticky ends.

Figure 2.2 DNA Layer Model

7|Page
The addition of ligase enzyme produces a reporter strand shown as a dotted line in the above diagram.
This reporter strand runs through the entire assembly. In this case bi = ai XOR ai’ where i =1,2….n and the
strand is R = a1a2….an.a1’a2’….an’.b1b2….bn. This strand can be extracted by first melting down the
hydrogen bonds between the tiles and then purifying by polyacrylamide gel. Now this strand contains
the plaintext, encryption key of OTP and the enciphered text. The cipher text can be extracted by using
the restriction enzyme endonuclease if the cleavage site is encoded between a0 and b1 tiles. The cipher
text may then be gel purified and stored in a compact form and sent to destination. As XOR is its own
inverse, the decryption of cipher text can be done using the bit sequence of one time pad. The only
precautionary measure in the whole procedure is that we have to check the loss of synchronization
between the message and the key which may happen by spuriously introducing or deleting a bit from
either sequence.

Naveen Jarold K. et.al [10] has implemented DNA cryptography using two approaches. In one Approach
they directly use DNA bases for encryption purposes. For this purpose they used the following lookup
table:

Table 2.1 DNA Lookup table

DNA Lookup table


A=CGA K=AAG U=CTG 0=ACT
B=CCA L=TGC V=CCT 1=ACC
C=GTT M=TCC W=CCG 2=TAG
D=TTG N=TCT X=CTA 3=GCA
E=GGC O=GGA Y=AAA 4=GAG
F=GGT P=GTG Z=CTT 5=AGA
G=TTT Q=AAC <space>=ATA 6=TTA
H=ATG R=TCA ,=TCG 7=ACA
I=ATG S=ACG .=GAT 8=AGG
J=AGT T=TTC :=GCT 9=GCG

And hence the encryption and decryption can be done using the above table. Both sender and the
receiver should have this lookup table for encryption and decryption. The simplified diagram of their
implementation of this scheme is as follows:

8|Page
Figure 2.3 Encryption using Lookup Table

The DNA encryption starts with the message that may contain alphabets, numerals and some special
characters. These characters are changed to DNA base triplets and this encrypted message or the cipher
text is send to the receiver over a public channel. This cipher text will be the input to the decryption
process which is simply the reverse of encryption.

In the second approach, they generate DNA coded sequence from the message and use that sequence
as key to the encryption processes. The encryption process in their case is AES. The simplified diagram
for encryption and decryption of this approach is as follows:

Figure 2.4 AES Encryption using DNA key

AES(advanced encryption standard) is the security standard/protocol developed by U.S. National


institute of Standards and Technology (NIST).

9|Page
3. Problem Statement
There are various modern techniques of cryptography which ensures the four security attributes
namely:

i. Availability
ii. Confidentiality
iii. Integrity
iv. Authenticity

But there are memory and computational issues with these techniques. To overcome these issues, DNA
computing techniques has been developed. These techniques are very efficient as they provide huge
memory and parallel computing of DNA. Keeping in mind these facts, the project has been carried out
using DNA bases to make a cryptographic system on matlab. In this system one time pad key is extracted
from DNA bases. After XORing this key with input, a text is obtained. This text is further represented in
DNA bases format using lookup table. These “bases” representation will become the cipher text. To
break this cipher text, the eavesdropper must have access to lookup table and one time pad key which is
stored in DNA bases, which is more or less impossible. The cipher text is now secured and can securely
transmit over any channel. At the receiver side, one time pad key can be extracted using a known
sequence of DNA bases. This key along with the lookup table is used to decrypt the cipher text.

10 | P a g e
4. Implementation
Implementation of DNA cryptography using One Time Pad scheme is done on matlab. One Time Pad
cryptography has been used as it is perfectly random scheme. According to Otto Kugler, the CEO of MILS
electronics, “One Time Pad encryption is the only proven unbreakable encryption method”. The input
has been taken in the forms of alphabets, numeric or any other special character. The OTP key is also
can be any of these forms. Encryption steps are as follows:

1. Input text and OTP key are converted to ASCII bits


2. In order to make the binary ASCII bits even a zero padding is done
3. After zero padding XOR operation is applied on the input and key
4. The XOR output is represented in DNA bases format and is ready to transmit as an
enciphered text. One possible representation is:
A=00 ; T=01 ; C=10 ; G=11
(Practically the DNA sequence obtained above is converted to DNA bases tile format using
enzymes and this output tile is encrypted message. As shown in literature review. )

The encrypted text consist data in the form of DNA bases and hence it makes impossible for
eavesdropping. This cipher text can be decrypted in steps (like encryption):

1) DNA bases are transformed into bits.


2) The above bits are XORed with OTP key bits to reproduce the original plain text.
3) This text is in the binary format which is converted to corresponding ASCII character.

Some of the programming concepts used in matlab coding are:

i. If else statements
ii. Character arrays
iii. Strings
iv. Character array indexing
v. Initialization
vi. Bit wise logical AND operator
vii. Bit wise logical OR operator
viii. Built in XOR function
ix. Vector to matrix conversions
x. Decimal to binary conversions
xi. Functions of Graphical User Interface

Using the above concepts, DNA cryptography has been successfully implemented on matlab. Figures 4.1
and 4.2 show the flow charts of various procedures, applied through coding, of encryption and
decryption respectively.

11 | P a g e
The Implemented code has the following flow chart for encryption process:

Figure 4.1 Encryption of Plaintext

12 | P a g e
The flow chart for decryption is different from that of encryption and is represented in the following
figure:

Figure 4.2 Decryption of Enciphered Text

13 | P a g e
5. Results
The implementation results are obtained both on matlab Command Window and matlab GUI. The
screenshot of Graphical User Interface of the implemented algorithm in matlab is as follows:

Figure 5.1 Matlab GUI

14 | P a g e
The screenshot which shows GUI containing input, OTP and DNA enciphered output is shown below:

Figure 5.2 GUI showing input and OTP

15 | P a g e
The image below shows the use of special characters and their results. As it can be seen that special
characters are also encrypted and decrypted successfully.

Figure 5.3 Encryption of Special Characters

16 | P a g e
References:

[1] Javier Resano, “A Hardware Implementation of the Smith-Waterman Algorithm for DNA
Comparison”, IEEE 2012.

[2] Radu Terec et al, “DNA Security using Symmetric and Asymmetric Cryptography”, IJNCAA (ISSN 2220-
9085), 2011

[3] Yunpeng Zhang and Liu He Bochen Fu. “Research on DNA Cryptography, Applied Cryptography and
Network Security”, Dr. Jaydip Sen (Ed.), ISBN: 978-953-51-0218-2, InTech, 2012.

[4] Zhihua Chen et el. “Efficient DNA Sticker Algorithms for DES”, IEEE 3rd international conference on
Bio-inspired computing, 2012

[5] Taylor C. et al, “Hiding Messages in DNA Microdots”, Nature 1999

[6] M. Reza Najaf Torkaman et al, “Innovative Approach to Improve Hybrid Cryptography by using DNA
Steganography”, IJNCAA 2012

[7] L. M. Adleman, “Molecular Computation of Solutions to Combinatorial Problems”, Science- 266:1021


{1024}, 1994

[8] Ashish Gehani et al, “DNA Based Cryptography”, DIMACS Series in Discrete Mathematics and
Theoretical Computer Science Volume 54, 2000

[9] David Kahn, “The Codebreakers”, Macmillan, NY, 1967

[10] Naveen Jarold K. et al, “Hardware Implementation of DNA Based Cryptography”, IEEE (Conference
of ICT), 2013

17 | P a g e
Appendix

The Source code is:


function varargout = SECURE(varargin)
% SECURE M-file for SECURE.fig
% SECURE, by itself, creates a new SECURE or raises the existing
% singleton*.
%
% H = SECURE returns the handle to a new SECURE or the handle to
% the existing singleton*.
%
% SECURE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SECURE.M with the given input arguments.
%
% SECURE('Property','Value',...) creates a new SECURE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before SECURE_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to SECURE_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help SECURE

% Last Modified by GUIDE v2.5 06-Feb-2015 00:35:58

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @SECURE_OpeningFcn, ...
'gui_OutputFcn', @SECURE_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before SECURE is made visible.


function SECURE_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to SECURE (see VARARGIN)

% Choose default command line output for SECURE


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes SECURE wait for user response (see UIRESUME)


% uiwait(handles.figure1);

18 | P a g e
% --- Outputs from this function are returned to the command line.
function varargout = SECURE_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure


varargout{1} = handles.output;

function edit1_Callback(hObject, eventdata, handles)


% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text


% str2double(get(hObject,'String')) returns contents of edit1 as a double

% --- Executes during object creation, after setting all properties.


function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit2_Callback(hObject, eventdata, handles)


% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text


% str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- Executes during object creation, after setting all properties.


function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
input = double(get(handles.edit1,'String'))
binput=de2bi(input,8,'left-msb')

19 | P a g e
key = double(get(handles.edit2,'String'))
bkey=de2bi(key,8,'left-msb')
%output=bitxor(input,key)
output=xor(binput,bkey)
boutput=double(output)
%boutput=dec2bin(output,8)
%getbitoutput = bitget(output, 8:-1:1)
%input=[1 0 1 0 1 0 1 0];
%key=[0 0 0 0 1 1 1 1];
num = double(numel(boutput))
set(handles.text5,'String',boutput)
boutput=boutput'
%outputdnabases=char();
%ia=INPUT('Enter bits',alpha)
%A=00,T=01,C=10,G-11
boutput

for n=1:2:num-1

if(boutput(n)==0&&boutput(n+1)==0)
outputdnabases((n+1)/2)='A';
else if(boutput(n)==0&&boutput(n+1)==1)
outputdnabases((n+1)/2)='T';
else if(boutput(n)==1&&boutput(n+1)==0)
outputdnabases((n+1)/2)='C';
else
outputdnabases((n+1)/2)='G';
end;
end;
end;
%set(handles.text6,'String',outputdnabases)
end;
outputdnabases
%outputdnabases1=double(outputdnabases)
set(handles.text6,'String',outputdnabases)

% --- Executes on button press in pushbutton2.


function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
inputdnabases=char();
key = double(get(handles.edit4,'String'))
inputdnabases = double(get(handles.edit5,'String'))
num = length(inputdnabases)
row=size(key,1)
for n=1:1:num
if(inputdnabases(n)==65)
bxor(n+n-1)=0;
bxor(n+n)=0;
else if (inputdnabases(n)==84)
bxor(n+n-1)=0;
bxor(n+n)=1;
else if (inputdnabases(n)==67)
bxor(n+n-1)=1;
bxor(n+n)=0;
else
bxor(n+n-1)=1;
bxor(n+n)=1;
end;
end;
end;
end;

bkey=de2bi(key,8,'left-msb')
bxor
bxor1 = vec2mat(bxor,8)
dxor=bi2de(bxor1,8)
bmsg=xor(bxor1,bkey)

20 | P a g e
%ma = vec2mat(m,8)
dmsg = bi2de(bmsg,'left-msb')
msg=char(dmsg)
set(handles.text10,'String',msg')
clear all;

function edit4_Callback(hObject, eventdata, handles)


% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4 as text


% str2double(get(hObject,'String')) returns contents of edit4 as a double

% --- Executes during object creation, after setting all properties.


function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit5_Callback(hObject, eventdata, handles)


% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit5 as text


% str2double(get(hObject,'String')) returns contents of edit5 as a double

% --- Executes during object creation, after setting all properties.


function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

21 | P a g e

View publication stats

You might also like