Lecture7 - Engineering Computation ENG 1D04 Lecture 7: 2D...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Engineering Computation ENG 1D04 Lecture 7: 2D arrays & strings Mihai Albu Copyright 2008 Alan Wassyng & Mihai Albu 1 Problem s How can you determine, based on DNA sequences, which of the following species are closer related? Human Gorilla Mouse Eagle Copyright 2008 Alan Wassyng & Mihai Albu 2 DNA sequences s Strings(arrays) of a,c,t,g s (could be) very long s We need to compare characters at each position between all the species Copyright 2008 Alan Wassyng & Mihai Albu 3 Useful methods Substring(int startIndex, int length) Substring(int startIndex) string s = I like 1D04; s.Substring(1,1); s.Substring(7); 1D04 Copyright 2008 Alan Wassyng & Mihai Albu 4 Useful methods IndexOf(char s) IndexOf(string s) Copyright 2008 Alan Wassyng & Mihai Albu 5 Useful methods s ToLower s ToUpper s Trim s Replace s Length s So what are strings? Copyright 2008 Alan Wassyng & Mihai Albu 6 To solve the problem s For each pair of two species: Get a measure/distance of how close/distant are the species s Fill in a matrix of distances Symmetric matrix 0 on the diagonal Copyright 2008 Alan Wassyng & Mihai Albu 7 We need something like D6 D5 D3 E D6 D4 D2 M D5 D4 D1 G D3 D2 D1 H E M G H Spec Copyright 2008 Alan Wassyng & Mihai Albu...
View Full Document

This note was uploaded on 04/13/2010 for the course CIVIL 2oi4 taught by Professor Lamiar during the Fall '10 term at McMaster University.

Page1 / 19

Lecture7 - Engineering Computation ENG 1D04 Lecture 7: 2D...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online