{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
Engineering Computation ENG 1D04 Lecture 7: 2D arrays & strings Mihai Albu
Background image of page 1

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

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 1 Problem square4 How can you determine, based on DNA sequences, which of the following species are closer related? Human Gorilla Mouse Eagle
Background image of page 2
© Copyright 2008 Alan Wassyng & Mihai Albu 2 DNA sequences square4 Strings(arrays) of a,c,t,g square4 (could be…) very long square4 We need to compare characters at each position between all the species
Background image of page 3

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

View Full Document Right Arrow Icon
© 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
Background image of page 4
© Copyright 2008 Alan Wassyng & Mihai Albu 4 Useful methods IndexOf(char s) IndexOf(string s)
Background image of page 5

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

View Full Document Right Arrow Icon
© Copyright 2008 Alan Wassyng & Mihai Albu 5 Useful methods square4 ToLower square4 ToUpper square4 Trim square4 Replace square4 Length square4 So what are strings?
Background image of page 6
© Copyright 2008 Alan Wassyng & Mihai Albu 6 To solve the problem… square4 For each pair of two species…:
Background image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}