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

Slides:



Advertisements
Similar presentations
ProgressBook User Start-Up
Advertisements

CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012.
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.
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.
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms Psych 209.
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
MICROSOFT WORD GETTING STARTED WITH WORD. CONTENTS 1.STARTING THE PROGRAMSTARTING THE PROGRAM 2.BASIC TEXT EDITINGBASIC TEXT EDITING 3.SAVING A DOCUMENTSAVING.
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.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.
PowerTeacher with Web Grade Book Semester Classes School Year August 2012.
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.
Welcome to College Mathematics Math 1332 Professor von Holstein.
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.
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.
Learning to use the Interactive Online Classroom Classroom Activities.
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 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.
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
Introduction To Computing BBA & MBA
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms
Training Document Accessing Reports in VinCENT.
Presentation transcript:

CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission is given to CS121 Fall 2012 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? – Were the quiz hints useful? – Who utilized the CLC? Pre-Lab Quizlet – Any questions/issues?

Some Administrative Notes and Guidelines Please attend your regularly scheduled section. If you need to switch in a particular week, get permission from your instructor to switch first. You may be turned away or not given credit for work otherwise. Be sure to check lab and quiz results on bbLearn when they are posted and report issues to your instructor immediately. It is important to resolve issues quickly. You may lose credit if it becomes too late to do anything conveniently. The bbLearn Discussion Board is now available – Use it to share experiences – Board is being monitored twice daily by assistants Quiz support – Aim to take the quiz prior to afternoon of deadline. – Come to the CLC for quiz assistance, utilize the quiz hints – You may take the quiz multiple times; only your highest result will count Please contact your individual instructor with any questions or problems – s to the cs12x_instructors mailbox that aren’t from staff go automatically into the trash bin.

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 parameter names 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.

Example – Script Format Place variable parameters here (text mode) 1 [1 [ 1 [assign to a name]  a -5 [assign to a name]  b 6 [assign to a name]  c Place invariant portion of script here (text mode) a*x^2 + b*x + c = 0 [return]  [click on blue equation – solve] End of script (text mode)

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”). – You can also do this by right-click assign to a 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 16 session Work as a team to solve the problems as per the lab description At end of lab: – get verification sheet signed (as team completes each part) – sign up for lab completion slot if necessary – SAVE your worksheet ( to team and/or selves)

Quiz 2 Activities Quiz 2 will be released on Friday (10/19) at 6pm – Deadline: Thursday (10/25) at 4:30pm – Makeup quiz: Friday (10/26 at 6PM) through Sunday (10/28 at 11PM) 20% penalty Pre-lab quizlet for Lab 3 – released on Thursday (10/25 at Noon) through Monday (10/29 at 8AM) Be sure to visit the CLC for quiz assistance (10/22- 10/26)