Class Notes (839,315)
United States (325,922)
ENG 6 (40)
Lecture 18

# ENG 06: Engineering Problem Solving with MATLAB – Lecture 18 notes

2 Pages
79 Views

Department
Engineering
Course Code
ENG 6
Professor
Professor Rajeevan Amirtharajah

This preview shows 80% of the first page. Sign up to view the full 2 pages of the document.
Description
ENG 06 – Lecture 18; 3/7/2013 Notes: Pattern Matching, ODEs Pattern Matching/Regular Expressions  Tokens o Variables, temporary variables o Storing the current pattern/set of patterns you have matched so you can match new patterns o You can denote them as ordinal numbers or as named tokens o With ‘regexp’ use keyword tokens, and the result is a token with the match o Allows you to look for repeated characters in a string o (?expr) captures in a token all characters matched by the expression within the parentheses and assigns a name to the token  generates a structure array  HTML o Identifying strings of text, telling web browser to modify it in some when displayed o Tags tell web browser which elements to present/not present o Use MATLAB command urlread to get HTML source code from a webpage o Ex. s=urlread('http://www.ece.ucdavis.edu/~knoesen/ENG6/test.html'); REGEXPREP  Example of regexp and regexpprep  Use regexprep to substitute based on a pattern  Example: o Y = ‘denise and ennis went to denny’’s to eat dinner’; o regexp(y,’den’,’match’) o ans = ‘den’ ‘den’ ‘den’ o regexp(y,’den\w*’,’match’) o ans = ‘denise’ ‘dennis’ ‘denny’ o regexprep(y,’den\w*’,’peter’)  ans = peter and peter when to peter’s to eat dinner o regexprep(y,’den(\w*)’,’peter\$1’)  ans = peterise and peternis went to peterny’s to eat dinner  need \$1, back reference which grabs the token in first set of parentheses Ordinary Differential Equations  Differential Equations
More Less

Only 80% of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document

Unlock to view full version

Unlock Document
Me

OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.