CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.

Slides:



Advertisements
Similar presentations
CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012.
Advertisements

CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2010.
No calculators or notes can be used on this quiz.
Today’s quiz on 8.2 B Graphing Worksheet 2 will be given at the end of class. You will have 12 minutes to complete this quiz, which will consist of one.
Chapter 3 Planning Your Solution
Math 010 online work that was due today at the start of class:
L AB R EPORT F ORMATTING I NSTRUCTIONS Fall2012 CHML212.
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University October 6-10, 2008 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University January 5-9, 2009 ©By the author. All rights reserved.
CS 122 Engineering Computation Lab Lab 2 Dan De Sousa and Tim Cheeseman Department of Computer Science Drexel University April 2009 ©By the author. All.
CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS 121 Engineering Computation Lab Lab 4 Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission is.
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 122 / CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
WRITING REPORTS Introduction Section 0 Lecture 1 Slide 1 Lecture 6 Slide 1 INTRODUCTION TO Modern Physics PHYX 2710 Fall 2004 Intermediate 3870 Fall 2015.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Summer, 2009 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 123 Engineering Computation Lab Lab 2 Dan De Sousa and Bruce Char Department of Computer Science Drexel University April 2009 ©By the author. All rights.
CS122 Instructor Assignments Winter, 2010 Term. Overview Some changes in assignments due to schedule considerations Some new initiatives / revised strategies.
CS121 Quiz 3 Fall 2012 Quiz Tips. Quiz 1 Tips Question 1 From the many calculation choices, use eval to calculate the dependent variable P(s), but use.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS122/CS123 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Summer 2011.
CS122 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS 123 Lab 4 Instructor: Mark Boady Course Designer: Professor Bruce Char Department of Computer Science Drexel University Spring 2013.
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS122 / CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
SPREADSHEETS Objective 6.02 Explain advanced spreadsheet concepts and functions Replication Features.
CS 121 Engineering Computation Lab Lab 3 Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission is.
CS123 Engineering Computation Lab Lab 1 Section Instructor: Mark Boady Content By: Bruce Char Department of Computer.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2012.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter, 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
CS 122 Engineering Computation Lab Lab 4 Dan De Sousa and Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights.
CS123 Engineering Computation Lab Lab 2 Instructor: Mark Boady Content By: Bruce Char Department of Computer Science Drexel University.
CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.
Math 010 online work that was due today at the start of class: Section 1.3A Online Homework.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2013.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter, 2011 ©By the author. All rights reserved.
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Winter 2010.
CS 121 Engineering Computation Lab Lab 4 Department of Computer Science Drexel University February 16-20, 2008 ©By the author. All rights reserved. Permission.
CS122 – Quiz 1 Winter, 2013 Quiz Hints. Quiz 1 Hints Question 1 – Understanding procs  First, we did not fully explain the structure of the Maple proc,
CS123 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Spring 2013.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2011.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission.
CS 122/CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
CS122 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Winter 2013.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS122 Engineering Computation Lab Lab 4
CS 121 Engineering Computation Lab Lab 3
CS 121 Engineering Computation Lab Lab 2
CS123 Engineering Computation Lab Lab 4
CS122 Engineering Computation Lab Lab 3
CS 121 Engineering Computation Lab Lab 3
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Presentation transcript:

CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission is given to CS121 Fall 2011 staff and students to use and reproduce these notes for their own use.

Recap of Lab 2 Cycle Lab 2 Common errors Using keyboard “e” instead of natural log base e Not explicitly entering arithmetic multiplication operator between terms Please follow lab directions – read over before starting development Scripting considerations Read over the problem first – then determine the changing parameters before beginning to develop the script itself Be sure to document start/end of script and parameter section Place parameters at top – before equations (the equations use the parameter names, which must be defined first)‏

Administrative Notes Special accommodations – if you have University permission for special accommodations (eg. extended exam time), please give copy of notice to instructor Lab Completion – be sure to obtain a lab completion time from your instructor at the end of class if you do not complete today’s lab Please be sure to check your lab, quiz, and quizlet grades when posted to bbVista and immediately report any discrepancies to your instructor for resolution There will be a cutoff date established for resolving such issues prior to final grade preparation Quiz grading If you accidentally re-open a quiz after you have graded the original one: You need to grade and exit the newly opened quiz before you can open the next test (eg. Quizlet) Your original score will be retained (MapleTA will always report your highest quiz result)!

Quiz 3 Activities Quiz 3 will be released on Friday (10/28) at 6pm Deadline: Wednesday (11/2) at 4:30pm Makeup quiz: Thursday (11/3) at 9am through Sunday (11/6) at 11:00pm 30% penalty Pre-lab quizlet for Lab 4 Released on Thursday (11/3) at noon through Monday (11/7) at 8:00am Be sure to visit the CLC for quiz assistance (10/31-11/4)‏

Lab 3 Overview Based on materials from Chapters 6 and 7 Chapter 6 – advanced scripting Textual vs. “clickable” interface for statement entry – solve and plot operations Introduction to lists Some plot options Maple’s on-line documentation feature Chapter 7 Using and Defining Functions Maple vs. user-defined functions

Lab 3 Overview Part 1 Figure out how to compute the shutter speed from blur angle of a photo – in conjunction with requirement from engr101 lab Write a script in Maple to do it with parameters. Check your script against a function that encapsulates the entire computation Do it yourself/understand it Use someone else’s work/hope that it’s right Part 2 (with experimental video) Point plotting – (x,y) coordinates Least squares data fitting (curve fitting) feature Combining 2 plots onto same grid

Discussion of Lab 3 Concepts Textual statement entry in Maple So far, we’ve used Maple’s “clickable” interface (palettes and right clicks) to create functions, plots and solve equations Demo: x^2 - 7*x > right click Plots -> 2D plot Note -10 to 10 default domain Note: only one solution at x=-7 crosses the x-axis To see both solutions (x=-7 and x=14), we must manually intervene using the Plot Builder Right click Plots -> Plot Builder -> x=-20 to 20 Both solutions cross the x-axis now

Discussion of Lab 3 Concepts Plot using textual representation Demo: plot(x^2 – 7*x – 98)‏ plot(x^2 – 7*x – 98, x= )‏ Note the difference: “Clickable” interface – had to manually fill in domain within Plot Builder Textual – merely edit the plot statement – no dialog box If using within a script, could just make domain endpoint parameters dstart := -20 dend := 20 plot(x^2 – 7*x – 98, dstart..dend)‏

Discussion of Lab 3 Concepts Textual version of “solve” Demo: eqn := temperature = *T temperature := 0 solve(eqn,T) -> 274.8… Note: we are solving the equation “eqn” for T

Discussion of Lab 3 Concepts Plotting Some plot options Demo: plot(X^2 + 3, color=“Blue”, labels=[“X”,”Y”])‏ Demo: 2 plots on the same grid, one being a horizontal (target) line target := 20 plot([x^2 + 3, target])‏

Discussion of Lab 3 Concepts Plotting (continued)‏ Lists and point plots A list is a sequence of values separated by commas and enclosed in [ ] X := [0, 1, 2, 3, 4, 5] Y := [3.1, 4.0, 4.9, 6.1, 7.2, 7.9] We can plot these 2 lists of points representing (0, 3.1), (1, 4.0), (2, 4.9), (3, 6.1), (4, 7.2), (5, 7.9)‏ plot(X, Y, style=point) -> point plot

Discussion of Lab 3 Concepts Plotting – super-imposing 2 plots on same grid eqn := y1 = x1 + 3 plot(rhs(eqn), x1=0..6, color=“blue”)‏ click on plot result and copy/paste at bottom of worksheet plot(X, Y, style=point)‏ click on plot result and copy click on plot at bottom of worksheet and paste

Discussion of Lab 3 Concepts Demo User defined functions – brief introduction for now # 1 st, define the function (Pythagorean Theorem) Hypotenuse := (a,b)  sqrt(a^2+b^2) # Calling (invoking ) the function Hypotenuse(6,8)  10 Hypotenuse(7,24)  25 Calling with symbolic values Hypotenuse(a,8)  sqrt(a^2 + 64) Hypotenuse(a,b)  aqrt(a^2+b^2) # Using evalf to obtain an approximate result Hypotenuse(5,11)  sqrt(146) – exact result evalf(Hypotenuse(5,11)  17.6 – approximate result

Discussion of Lab 3 Concepts Demo Using convert – a Maple function Convert(value to convert, units, from units, to units) Vmph := 15 # velocity – 15 miles per hour Vips := convert(Vmph, units, miles/hour, inches/second) Using Maple’s Units Calculator Tools  Assistants  Units Calculator Example – convert 15 mph to (264) inches per second

Discussion of Lab 3 Concepts Demo Some additional Maple features for today’s lab restart Place at top of script Erases all assigned variable values Example A := 1 B := 2 A  1 B  2 restart A  A B  B

Discussion of Lab 3 Concepts Some other useful Maple concepts Command completion – using the “esc” key Use to provide proper syntax for an operation Demo : solve + “esc” → list of commands starting with “solve” → solve(eqn) → solve(x^2-4=0) The “eval” operation Use to evaluate an expression at a certain value Demo : exp1:=3 + 5*t eval(exp1,t=5) → 28 Use eval + “esc” to show other variations

Discussion of Lab 3 Concepts Some Maple features used in Part 2 Maple Online Help Help search “least squares” Note examples in red – Demo: with(Curvefitting): L := [[0,1], [1,2], [2,3], [3,10]] # list of points bestfiteqn:=LeastSquares(L, V)  -1/5 + 14/5 V File -> Close Help The least squares method Will create a linear equation that “best matches” the list of (x,y) data points Method minimizes the sum of the squares of distances between the actual points and the linear approximation

Getting Starting Lab 3 Tips Part 1 – Huddle with your teammates to determine algorithm and write steps / calculations on whiteboard before typing anything into a worksheet. – Use the clickable interface to do a quick calculation using Maple to find the shutter speed for Case A – Create a Maple script with textual versions of the operations that mimics these calculations (use the form indicated in the Lab notes – header, use of restart, parameter section, etc.) – **** You can use these scripts and results in your engr101 camera report