CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2010 ©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.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
Today’s quiz on 8.2 A Graphing Worksheet 1 will be given at the end of class. You will have 12 minutes to complete this quiz, which will consist of one.
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.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 16. IMPORTANT NOTE: If you have time left out of your five minutes.
Make sure you know the day and time of the final exam for this section of Math 110: Day: ______ Date:______ Time: ______ to _______ All Math 110 finals.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
Updating Your Class and Event Calendar. The “CW” – Compelling Why For marketing purposes, we can actively promote your classes via , etc. by sending.
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
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 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.
11 Insert Agency Name Time and Labor Implementation Meeting Insert Date of Meeting.
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.
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.
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.
MATH 113 Fall  Prerequisites: ◦ Grade of C – or better in Math 112  Every student must have an active “crimson” account for computer/course.
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.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
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.
CS 121 Engineering Computation Lab Lab 3 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.
1. PLEASE HELP US OUT WITH THIS: When you go to the open lab next door in 203, please make sure you sign in on the log sheet and enter your instructor’s.
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.
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.
Teachers: If you hand back Test 4 today, tell your class you will review it with them in class on Thursday when you do the review lecture on Chapters 6,
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
Presentation transcript:

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

Recap of Initial Cycle Lab 1 – Has anyone not taken? Please contact your instructor – Material covered in Lab 1 (Maple arithmetic, use of palettes, equation solving, and plotting) is critical to future labs – General rule – we solve equations and plot (right hand side) expressions Quiz 1 – Has anyone not taken either the regular or makeup version? – Who utilized the CLC? – Who found the “hot potato” slides useful? Pre-Lab Quizlet – Any questions/issues?

Some Administrative Notes and Guidelines Please attend your regularly scheduled section Be sure to check lab and quiz results on bbVista as soon as posted and report issues to your instructor immediately. It is important to resolve issues as soon as they occur. The bbVista Discussion Board is now available – Use it to share experiences – Board is being monitored twice daily by assistants Quiz support – Try to take the quiz prior to Wednesday afternoon – Please bring your laptop to the CLC for quiz assistance – You may take the quiz multiple times; only your highest result will count Please contact your individual instructor with any questions or problems – Do NOT send s to the cs12x_instructors mailbox!

Some Administrative Notes and Guidelines Monday Students – Please attend your Columbus Day makeup sessions on Monday (10/18) or Tuesday (10/19) at 6PM as assigned in confirmation – Be sure to attend in the room you were assigned in that – If you have not yet arranged for a makeup lab, send your name, section and availability (Monday and / or Tuesday – 6PM) to

Lab 2 Overview Based on materials from Chapters 3, 4 and 5 – Chapter 3: Text (word) processing – Chapter 4: Labels and assignments – Chapter 5 : Building scripts Part 1 – Apply a given script to solve 3 versions of the same problem (with different values for parameters) Part 2 – Develop your own script and apply it to solve different versions of a given problem

Discussion of Lab 2 Concepts What is a script? – A script is a sequence of operations. Usually, the later operations use the results of earlier ones – Labels or assignments (to be discussed shortly) are used to make the references convenient How are scripts useful? – Scripts are useful when you expect to solve a series of similar problems – Reuse: cut, paste, edit, re-execute

Pointers on Script Development 1.Determine how to do the problem before creating the script 2.Find which parameters can change and place them at the beginning of the script 3.As you create the general script, use parameters as opposed to fixed values in the body of the script 4.Use text to document the beginning and end of the script Our demo will illustrate these ideas using the sheep population problem from Lab 1.

Other Concepts Used in Lab 2 Script development in Maple encompasses a variety of concepts: – Text (word processing) features of Maple for script documentation and equation writing – Use of labels and assignments to remember the results for future use – Equation manipulation and solving (from Lab 1) – Script development using Maple’s clickable interface versus textual commands

Text (Word Processing) Capabilities of Maple Ordinary entry is 2D Maple (math) mode Can also enter text. Once in text mode, can use word processing features such as boldface, italics, center- justification, etc. Control-T => to text mode (or click on “text” button) Control-R => to math mode (or click on “math” button) – Use command instead of control with Mac computers Greek letters – via Greek symbols palette Subscripts (eg. X 1 ) – use shift + underscore to type a subscript – right arrow to get back to next term Demo: the equation is the slope of a line

Use of Labels and Assignments Hitting enter (return) gives a numerical label (on far right) Control-L (command-L) lets you refer to a results by its label Assignment: name := expression (stores the result of the expression in the variable “name”) Note the difference between := (assignment) and = (equation – equality) Demo: – ex1 := 6^2 + 8^2->100(1) – sqrt(ex1)->10(2) – sqrt((1))->10(3) – Note: label entered in dialog box created from Control-L

Equation Solving Consideration Limiting solutions to feasible values Ex. Given the area of the circle  find the corresponding radius – Demo – Area := 25*Pi # sets value for area – Area = Pi * radius ^2 (rt.click – solve)  radius = 5 and -5 – Area = Pi * radius ^2, radius>0 (rt. Click - solve)  radius = 5

Maple’s Clickable vs. Textual Interface So far, we have focused on Maple’s clickable interface features to assign variables, solve equations and plot expressions – Use of expression and common symbols palettes – Right click on equations, expressions to solve and plot (plot builder allows for setting of variety of parameters and options) The Assignment operator (:=) is our 1 st look at using Maple’s textual command interface – As opposed to right clicking on a value and assigning a name Later, we will notice that scripts become more general and flexible when we use textual commands

Demo: Script Development Using Lab 1 Sheep Population Example In Lab 1: N=220/(1+10*0.83^t), where breeding group is 20 sheep and N is population after t years – stable without supervision at 80 sheep When breeding group is 33 => N=330/(1+10*0.79^t), – stable at 85 sheep When breeding group is 45 => N=450/(1+10*0.63^t) – stable at 90 sheep Problem – develop a Maple script to: – Graph N versus t – t (# of years) for stability to occur – Max # of sheep supported

Demo: Sheep Population Model Which parameters will vary? – Let general equation be N=P/(1+10*c^t) where parameter P and c vary. Also, the stable size (s) varies Script Place parameters at start of script – here 220 [assign to a name]  P 0.83 [assign to a name]  c 80 [assign to a name]  N

Sheep Population Script – Continued Place constant part of script here P/(1+10*c^t) [assign to a name]  sheepexp sheepexp [return]--> [click on blue expression  plots / plot builder – set range from 0 to 60, options – vertical N from 0 to P+20  plot of model] N=sheepexp [return]  [click on blue equation – solve]  t=9.3……. sheepexp-->[limit as t goes to infinity – use expression palette]  220 End of script

To Re-execute the Script Change parameters P, c, and s Highlight script Copy (control-c) and paste in new worksheet (File / New / Document Mode) + (control-v) Edit -> re-execute Demo with P=330, c=0.79, N=85 End of Demo

What To Do Now Sign verification sheet (print neatly) with partners Bring up Lab 2 description from course website – Launch Maple 14 session Work as a team to solve the problems as per the lab description – Be sure to “trade” scripts with a teammate in Part 1 before running version 3 At end of lab: – get verification sheet signed (as team completes each part) – SAVE your worksheet ( to team or save to bbVista)

Quiz 2 Activities Quiz 2 will be released on Friday (10/15) at 6pm – Deadline: Friday (10/22) at 4:30pm – Makeup quiz: Friday (10/22 at 6PM) through Sunday (10/24 at 11PM) 20% penalty Pre-lab quizlet for Lab 3 – released on Thursday (10/21 at Noon) through Monday (10/25 at 8AM) Be sure to visit the CLC for quiz assistance (10/18- 10/22) Monday students – please attend your Columbus Day makeup sessions as confirmed (Monday, 10/18 and Tuesday, 10/19) – please attend in assigned lab room!!!