{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

Engineering Computation ENG 1D04 Lecture 7: 2D arrays & strings Mihai Albu

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

View Full Document
© 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
© 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

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

View Full Document
© 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)

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

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}