MATLAB Session for CS4514

Size: px
Start display at page:

Download "MATLAB Session for CS4514"

Transcription

1 MATLAB Session for CS4514 Adrin Her Computing & Communictions Center - November 28, Prt of the notes re from Mtlb documenttion 1 MATLAB Session for CS Mtlb Bsics Strting Mtlb Mtlb Help Mtlb Vribles Numbers Opertors Functions Mtrices Writing script Plotting Dt Importing Dt 2. Processing experimentl dt slides 32-end Importing Dt in Mtlb codes: code1.m Processing Dt code2.m Plotting Dt A. Files: typeperf1.csv, typeperf2.csv, etc B. Files: logfile1.dt, logfile2.dt, etc 2

2 Wht is Mtlb? MATLAB is high-performnce lnguge for technicl computing. It integrtes computtion, visuliztion, nd progrmming in n esy-touse environment where problems nd solutions re expressed in fmilir mthemticl nottion. MATLAB stnds for mtrix lbortory. MATLAB is n interctive system whose bsic dt element is n mtrix (rry) tht does not require dimensioning. This llows you to solve mny technicl computing problems, especilly those with mtrix nd vector formultions, in frction of the time it would tke to write progrm in sclr non-interctive lnguge such s C or Fortrn. 3 Strting Mtlb Windows: Strt menu Mtlb Mtlb Unix: Terminl window type mtlb Menu Current Directory Workspce Window Commnd Window History Window 4

3 Mtlb Help 1. Using HELP menu MATLAB Help HELP Using Help Browser 2. >> helpdesk Opens the Help browser. 3. >> help commndnme/toolboxnme/functionnme Ex: >> help sin 4. >> doc commndnme/toolboxnme/functionnme displys the detiled info in the Help browser. Ex: >> doc sin Other commnds: 5. >> lookfor = helpdesk -> serch 5 I. Mtlb Progrmming Mtlb Vribles Opertors Functions.. 6

4 Mtlb Vribles A MATLAB vrible is essentilly tg tht you ssign to vlue in memory. MATLAB does not require ny type declrtions or dimension sttements. When MATLAB encounters new vrible nme, it utomticlly cretes the vrible nd lloctes the pproprite mount of storge. If the vrible lredy exists, MATLAB chnges its contents. Vrible nmes consist of letter, followed by ny number of letters, digits, or underscores. MATLAB uses only the first 31 chrcters of vrible nme. MATLAB is cse sensitive; it distinguishes between uppercse nd lowercse letters. MATLAB stores vribles in prt of memory clled workspce. To view wht is stored in vrible type its nme. Types of Vribles: MATLAB provides three bsic types of vribles: Locl Vribles Globl Vribles Persistent Vribles 7 Mtlb Vribles Rules for vrible nmes: Mke Sure Vrible Nmes Are Vlid Don't Use Function Nmes for Vribles Check for Reserved Keywords Avoid Using i nd j for Vribles How to remove vrible from workspce: Syntx: vrilenme=vlue; Exmple: >> =5; >> b=7; >> c=+b >> method= liner >> cler vriblenme >> cler - removes ll vribles from the workspce (!!!!) ns = defult vrible, when the result is not ssign to vrible Exercise: 1. Define 1=8 nd b2=8, c1=1+b2 2. Other commnds: vrible= input( prompt ) (>>help input) >> 3=input( 3= ) 8

5 Opertors Expressions use fmilir rithmetic opertors nd precedence rules. 9 Mtlb Functions 1. Stndrd elementry mthemticl functions >> help elfun Trigonometric (sin, cos) Exponentil (exp, log) Complex (bs, ngle) Rounding nd reminder (round) 2. Elementry mtrices nd mtrix mnipultion. >> help elmt 3. Specilized mth functions. >> help specfun 10

6 Sttistics men, std, min, mx Given: vector x Syntx: M = men(x) S = std(x) min_x = min(x) mx_x=mx(x) - verge or men vlue - returns the stndrd devition - the smllest element in x - returns the lrgest element in x Exmple: open the file mysttistics.m mysttistics.m mysttistics1.m Advnced: Sttistics for multidimensionl dt sets Sttistics toolbox 11 Mtrices Opertors Functions.. 12

7 Mtrix & bsic mtrix functions Define mtrix: 1. Type the mtrix 2. Use Specilized Mtrix Functions Mtrix Mnipultion Mtrix Functions 13 Mtrix: Define mtrix 1. Type the mtrix Seprte the elements of row with blnks or comms. Use semicolon, ;, to indicte the end of ech row. Surround the entire list of elements with squre brckets, [ ]. 3 S = >> S=[3-10 0; ; ] Bsic mtrix informtion: size (size of mtrix) >> [m,n] = size(x) 14

8 Mtrix: Accessing Mtrix Elements individul element >> A(2,2) ns = 20 1 A = column >> A(:,2) row >> A(2,:) group of elements >> A(2,1:3) ns = : (colon) ll elements 2 20 ns = ns = first element : step: lst element 15 Mtrix: Opertions A+B A-B A*B A/B A\B A^B A' A.*B A./B A.\B A.^B A.' 16

9 Mtrix: Opertions A = 2 3 1, B =, >> A=[1 2 3; 2 3 1; 2 2 2]; >> B= [ ; ; 1 2 3]; >> A*B ns = A = A * B = b b b , b b b b B = b b b b b b b b b b b , >> A.*B ns = IV. Mtlb Progrmming How to write progrm (M-files) Script Function How to plot dt 18

10 M-files Files tht contin code in the MATLAB lnguge re clled M-files. You crete M-files using text editor. Use M-file s ny other MATLAB function or commnd. A M-file is plin text file. Two kinds of M-files: Scripts do not ccept input rguments or return output rguments operte on dt in the workspce. Functions cn ccept input rguments nd return output rguments internl vribles re locl to the function. >> edit filenme >> edit exswitch 19 Mtlb - Plotting plot Sintx: plot(y); plot(x,y); plot(x,y,s) The plot function hs different forms, depending on the input rguments. If y is vector, plot(y) produces piecewise liner grph of the elements of y versus the index of the elements of y. If you specify two vectors s rguments, plot(x,y) produces grph of y versus x. 20

11 Mtlb - Plotting plot(x,y, s); s llows to plot : colors, symbols, different lines b blue. point - solid g green o circle : dotted r red x x-mrk -. dshdot c cyn + plus -- dshed m mgent * str (none) no line y yellow s squre k blck d dimond. plot (x,y,'c+:') plots cyn dotted line with plus t ech dt point; 21 Mtlb - Plotting cler t=0:0.01:10; % time seconds signlsin=sin(2*pi*t); % signl1 - frequency =1 Hz signlcos=0.5*cos(2*pi*t); % signl2 - frequency =1 Hz figure plot(t,signlsin); hold on plot(t,signlcos, '-*r'); plot2signls.m xlbel('time'); ylbel('signl'); legend('sin', 'Cos'); title('two Signls','FontSize',12) Other commnds: xlbel figure ylbel legend, title 22

12 Mtlb - Plotting Two Signls Sin Cos signl time 23 Visuliztion - Interctive editing (optionl) show plot tools 24

13 Visuliztion (optionl) plot, plotyy, stem, subplot plot(y) plot(x1,y1,...) plot(x1,y1,linespec,propertynme',propertyvlue,...) plotyy (X1,Y1,X2,Y2) plots Y1 versus X1 with y-xis lbeling on the left nd plots Y2 versus X2 with y-xis lbeling on the right. stem (X,Y) plots the dt sequence Y t the vlues specified in X. suplot (m,n,p), breks the Figure window into n m-by-n mtrix of smll xes, selects the p-th xes for for the current plot 25 Visuliztion %%%%% plot commnds %%%%%%%%%%%%%%% t=1:1:20; x=sin(t/5); y=0.01*x.*exp(-t); see: testplot.m figure subplot(2,2,1) plot(t,x,'--rs','linewidth',2, MrkerEdgeColor','k',... 'MrkerFceColor','g','MrkerSize',6); title('plot 1'); subplot(2,2,2) stem(t,x,'--rs','linewidth',2); title('plot 2') subplot(2,2,3); br(t,x); title('plot 3') subplot(2,2,4) plotyy(t,x, t,y); title('plotyy') 26

14 Visuliztion (optionl) Line Plots Br Plots 3D Surfce Vector Fields 27 Publishing script to HTML 28

15 Importing nd Exporting Dt using the Import Wizrd sve, lod dlmred, dlmwrite xlsred, xlswrite fopen,, fscnf, fprintf importdt 29 Importing Dt 1. Using the Import Wizrd with Text Dt File Import Dt or >> uiimport 2 Supported File Formts Wizrd: missing dt: NN (Not--Number.) 30

16 Importing nd Exporting Dt 2 Supported File Formts 31 Processing Experimentl Dt for the Project 1. Dt Preprtion 2. Import Dt in Mtlb 3. Process Dt 4. Plot Dt A. Files: typeperf1.csv, typeperf2.csv, etc B. Files: logfile1.dt, logfile2.dt, etc code1.m code2.m 32

17 1. Dt Preprtion 1. Open s Text (typeperf.csv) 2. Editor window: Edit Find nd Replce Remove double quottion mrks 3. File Sve s (typeperfm.csv) Import Dt in Mtlb A = importdt( typeperfm.csv ); % lod dt into structure Structure A with two fields: A.dt (numeric dt) A.textdt (text dt) 34

18 2. Import Dt in Mtlb A = importdt( typeperfm.csv ); Col 1 Col 2 Col 3 Col 4 A.textdt (text dt) Process Dt min sec msec timedte=a.textdt(2:end,1); % time dt timeutc=dtenum(timedte); % trnsform time to UTC relutctime=timeutc-timeutc(1); % define reltive time T=dtestr(relUTCTime, 'MMSSFFF'); % time in minutes, seconds, mseconds 36

19 4. Plot Dt Figure1 typeperf1m.csv typeperf2m.csv col Time 1.1 x 107 Figure2 1.1 col Time Figure col Time Dt Preprtion 1. Open s Text (logfile.dt) 2. Editor window: Edit Find nd Replce Remove [ D-CE-5D] 3. File Sve s (logfilem.dt) 38

20 2. Import Dt in Mtlb Row no dtexp=dlmred('logfilem.dt', '', 1, 0); Col no 3. Process Dt timeutc=dtexp(:,1); reltime=timeutc-timeutc(1); Plot Dt & Extrct Info 40

21 Processing Experimentl Dt for the Project 1. Dt Preprtion 2. Import Dt in Mtlb 3. Process Dt 4. Plot Dt A. Files: typeperf1.csv, typeperf2.csv, etc B. Files: logfile1.dt, logfile2.dt, etc code1.m code2.m 41

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers Mth Modeling Lecture 4: Lgrnge Multipliers Pge 4452 Mthemticl Modeling Lecture 4: Lgrnge Multipliers Lgrnge multipliers re high powered mthemticl technique to find the mximum nd minimum of multidimensionl

More information

Introduction To Files In Pascal

Introduction To Files In Pascal Why other With Files? Introduction To Files In Pscl Too much informtion to input ll t once The informtion must be persistent (RAM is voltile) Etc. In this section of notes you will lern how to red from

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples COMPUTER SCIENCE 123 Foundtions of Computer Science 6. Tuples Summry: This lecture introduces tuples in Hskell. Reference: Thompson Sections 5.1 2 R.L. While, 2000 3 Tuples Most dt comes with structure

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

Agilent Mass Hunter Software

Agilent Mass Hunter Software Agilent Mss Hunter Softwre Quick Strt Guide Use this guide to get strted with the Mss Hunter softwre. Wht is Mss Hunter Softwre? Mss Hunter is n integrl prt of Agilent TOF softwre (version A.02.00). Mss

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

Lab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results

Lab 1 - Counter. Create a project. Add files to the project. Compile design files. Run simulation. Debug results 1 L 1 - Counter A project is collection mechnism for n HDL design under specifiction or test. Projects in ModelSim ese interction nd re useful for orgnizing files nd specifying simultion settings. The

More information

Reducing a DFA to a Minimal DFA

Reducing a DFA to a Minimal DFA Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,

More information

Spring 2018 Midterm Exam 1 March 1, You may not use any books, notes, or electronic devices during this exam.

Spring 2018 Midterm Exam 1 March 1, You may not use any books, notes, or electronic devices during this exam. 15-112 Spring 2018 Midterm Exm 1 Mrch 1, 2018 Nme: Andrew ID: Recittion Section: You my not use ny books, notes, or electronic devices during this exm. You my not sk questions bout the exm except for lnguge

More information

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications. 15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

- 2 U NIX FILES 1. Explin different file types vilble in UNIX or P OSIX s ystem. ( 08 mrks) ( My-08/Dec-08/My-10/My- 12) 2. Wht is n API? How is it di

- 2 U NIX FILES 1. Explin different file types vilble in UNIX or P OSIX s ystem. ( 08 mrks) ( My-08/Dec-08/My-10/My- 12) 2. Wht is n API? How is it di -1 I NTRODUCTION 1. Wht is posix stndrd? Explin different subset of posix stndrd. Write structure of progrm to filter out non- p osix complint codes from user progrm. ( 06 mrks) ( Dec- 2010). 2. W rite

More information

PYTHON PROGRAMMING. The History of Python. Features of Python. This Course

PYTHON PROGRAMMING. The History of Python. Features of Python. This Course The History of Python PYTHON PROGRAMMING Dr Christin Hill 7 9 November 2016 Invented by Guido vn Rossum* t the Centrum Wiskunde & Informtic in Amsterdm in the erly 1990s Nmed fter Monty Python s Flying

More information

Functor (1A) Young Won Lim 10/5/17

Functor (1A) Young Won Lim 10/5/17 Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published

More information

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment File Mnger Quick Reference Guide June 2018 Prepred for the Myo Clinic Enterprise Khu Deployment NVIGTION IN FILE MNGER To nvigte in File Mnger, users will mke use of the left pne to nvigte nd further pnes

More information

EasyMP Multi PC Projection Operation Guide

EasyMP Multi PC Projection Operation Guide EsyMP Multi PC Projection Opertion Guide Contents 2 Introduction to EsyMP Multi PC Projection 5 EsyMP Multi PC Projection Fetures... 6 Connection to Vrious Devices... 6 Four-Pnel Disply... 6 Chnge Presenters

More information

Epson iprojection Operation Guide (Windows/Mac)

Epson iprojection Operation Guide (Windows/Mac) Epson iprojection Opertion Guide (Windows/Mc) Contents 2 Introduction to Epson iprojection 5 Epson iprojection Fetures... 6 Connection to Vrious Devices... 6 Four-Pnel Disply... 6 Chnge Presenters nd Projection

More information

Dr. D.M. Akbar Hussain

Dr. D.M. Akbar Hussain Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence

More information

Fall 2017 Midterm Exam 1 October 19, You may not use any books, notes, or electronic devices during this exam.

Fall 2017 Midterm Exam 1 October 19, You may not use any books, notes, or electronic devices during this exam. 15-112 Fll 2017 Midterm Exm 1 October 19, 2017 Nme: Andrew ID: Recittion Section: You my not use ny books, notes, or electronic devices during this exm. You my not sk questions bout the exm except for

More information

EasyMP Network Projection Operation Guide

EasyMP Network Projection Operation Guide EsyMP Network Projection Opertion Guide Contents 2 Introduction to EsyMP Network Projection EsyMP Network Projection Fetures... 5 Disply Options... 6 Multi-Screen Disply Function... 6 Movie Sending Mode...

More information

pdfapilot Server 2 Manual

pdfapilot Server 2 Manual pdfpilot Server 2 Mnul 2011 by clls softwre gmbh Schönhuser Allee 6/7 D 10119 Berlin Germny info@cllssoftwre.com www.cllssoftwre.com Mnul clls pdfpilot Server 2 Pge 2 clls pdfpilot Server 2 Mnul Lst modified:

More information

McAfee Network Security Platform

McAfee Network Security Platform Mnger Applince Quick Strt Guide Revision B McAfee Network Security Pltform This guide is high-level description of how to instll nd configure the Mnger Applince. For more detiled instlltion informtion,

More information

Functor (1A) Young Won Lim 8/2/17

Functor (1A) Young Won Lim 8/2/17 Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published

More information

Geometric transformations

Geometric transformations Geometric trnsformtions Computer Grphics Some slides re bsed on Shy Shlom slides from TAU mn n n m m T A,,,,,, 2 1 2 22 12 1 21 11 Rows become columns nd columns become rows nm n n m m A,,,,,, 1 1 2 22

More information

Midterm 2 Sample solution

Midterm 2 Sample solution Nme: Instructions Midterm 2 Smple solution CMSC 430 Introduction to Compilers Fll 2012 November 28, 2012 This exm contins 9 pges, including this one. Mke sure you hve ll the pges. Write your nme on the

More information

NOTES. Figure 1 illustrates typical hardware component connections required when using the JCM ICB Asset Ticket Generator software application.

NOTES. Figure 1 illustrates typical hardware component connections required when using the JCM ICB Asset Ticket Generator software application. ICB Asset Ticket Genertor Opertor s Guide Septemer, 2016 Septemer, 2016 NOTES Opertor s Guide ICB Asset Ticket Genertor Softwre Instlltion nd Opertion This document contins informtion for downloding, instlling,

More information

vcloud Director Service Provider Admin Portal Guide vcloud Director 9.1

vcloud Director Service Provider Admin Portal Guide vcloud Director 9.1 vcloud Director Service Provider Admin Portl Guide vcloud Director 9. vcloud Director Service Provider Admin Portl Guide You cn find the most up-to-dte technicl documenttion on the VMwre website t: https://docs.vmwre.com/

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In the last lecture, we discussed how valid tokens may be specified by regular expressions. LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.

More information

Introduction to Julia for Bioinformatics

Introduction to Julia for Bioinformatics Introduction to Juli for Bioinformtics This introduction ssumes tht you hve bsic knowledge of some scripting lnguge nd provides n exmple of the Juli syntx. Continuous Assessment Problems In this course

More information

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

OUTPUT DELIVERY SYSTEM

OUTPUT DELIVERY SYSTEM Differences in ODS formtting for HTML with Proc Print nd Proc Report Lur L. M. Thornton, USDA-ARS, Animl Improvement Progrms Lortory, Beltsville, MD ABSTRACT While Proc Print is terrific tool for dt checking

More information

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012 Dynmic Progrmming Andres Klppenecker [prtilly bsed on slides by Prof. Welch] 1 Dynmic Progrmming Optiml substructure An optiml solution to the problem contins within it optiml solutions to subproblems.

More information

Lecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure

Lecture Overview. Knowledge-based systems in Bioinformatics, 1MB602. Procedural abstraction. The sum procedure. Integration as a procedure Lecture Overview Knowledge-bsed systems in Bioinformtics, MB6 Scheme lecture Procedurl bstrction Higher order procedures Procedures s rguments Procedures s returned vlues Locl vribles Dt bstrction Compound

More information

Agenda & Reading. Class Exercise. COMPSCI 105 SS 2012 Principles of Computer Science. Arrays

Agenda & Reading. Class Exercise. COMPSCI 105 SS 2012 Principles of Computer Science. Arrays COMPSCI 5 SS Principles of Computer Science Arrys & Multidimensionl Arrys Agend & Reding Agend Arrys Creting & Using Primitive & Reference Types Assignments & Equlity Pss y Vlue & Pss y Reference Copying

More information

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html

More information

Stack. A list whose end points are pointed by top and bottom

Stack. A list whose end points are pointed by top and bottom 4. Stck Stck A list whose end points re pointed by top nd bottom Insertion nd deletion tke plce t the top (cf: Wht is the difference between Stck nd Arry?) Bottom is constnt, but top grows nd shrinks!

More information

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables George Boole IT 3123 Hrdwre nd Softwre Concepts My 28 Digitl Logic The Little Mn Computer 1815 1864 British mthemticin nd philosopher Mny contriutions to mthemtics. Boolen lger: n lger over finite sets

More information

Simrad ES80. Software Release Note Introduction

Simrad ES80. Software Release Note Introduction Simrd ES80 Softwre Relese 1.3.0 Introduction This document descries the chnges introduced with the new softwre version. Product: ES80 Softwre version: 1.3.0 This softwre controls ll functionlity in the

More information

10/9/2012. Operator is an operation performed over data at runtime. Arithmetic, Logical, Comparison, Assignment, Etc. Operators have precedence

10/9/2012. Operator is an operation performed over data at runtime. Arithmetic, Logical, Comparison, Assignment, Etc. Operators have precedence /9/22 P f Performing i Si Simple l Clcultions C l l ti with ith C#. Opertors in C# nd Opertor Precedence 2. Arithmetic Opertors 3. Logicl Opertors 4. Bitwise Opertors 5. Comprison Opertors 6. Assignment

More information

CS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7.

CS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7. CS 241 Fll 2017 Midterm Review Solutions Octoer 24, 2017 Contents 1 Bits nd Bytes 1 2 MIPS Assemly Lnguge Progrmming 2 3 MIPS Assemler 6 4 Regulr Lnguges 7 5 Scnning 9 1 Bits nd Bytes 1. Give two s complement

More information

Matrices and Systems of Equations

Matrices and Systems of Equations Mtrices Mtrices nd Sstems of Equtions A mtri is rectngulr rr of rel numbers. CHAT Pre-Clculus Section 8. m m m............ n n n mn We will use the double subscript nottion for ech element of the mtri.

More information

VMware Horizon JMP Server Installation and Setup Guide. Modified on 06 SEP 2018 VMware Horizon 7 7.6

VMware Horizon JMP Server Installation and Setup Guide. Modified on 06 SEP 2018 VMware Horizon 7 7.6 VMwre Horizon JMP Server Instlltion nd Setup Guide Modified on 06 SEP 2018 VMwre Horizon 7 7.6 You cn find the most up-to-dte technicl documenttion on the VMwre wesite t: https://docs.vmwre.com/ If you

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop

More information

From Dependencies to Evaluation Strategies

From Dependencies to Evaluation Strategies From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute

More information

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion

More information

Math 142, Exam 1 Information.

Math 142, Exam 1 Information. Mth 14, Exm 1 Informtion. 9/14/10, LC 41, 9:30-10:45. Exm 1 will be bsed on: Sections 7.1-7.5. The corresponding ssigned homework problems (see http://www.mth.sc.edu/ boyln/sccourses/14f10/14.html) At

More information

CS201 Discussion 10 DRAWTREE + TRIES

CS201 Discussion 10 DRAWTREE + TRIES CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the

More information

Assignment 4. Due 09/18/17

Assignment 4. Due 09/18/17 Assignment 4. ue 09/18/17 1. ). Write regulr expressions tht define the strings recognized by the following finite utomt: b d b b b c c b) Write FA tht recognizes the tokens defined by the following regulr

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

Digital Design. Chapter 1: Introduction. Digital Design. Copyright 2006 Frank Vahid

Digital Design. Chapter 1: Introduction. Digital Design. Copyright 2006 Frank Vahid Chpter : Introduction Copyright 6 Why Study?. Look under the hood of computers Solid understnding --> confidence, insight, even better progrmmer when wre of hrdwre resource issues Electronic devices becoming

More information

Stained Glass Design. Teaching Goals:

Stained Glass Design. Teaching Goals: Stined Glss Design Time required 45-90 minutes Teching Gols: 1. Students pply grphic methods to design vrious shpes on the plne.. Students pply geometric trnsformtions of grphs of functions in order to

More information

L2-Python-Data-Structures

L2-Python-Data-Structures L2-Python-Dt-Structures Mrch 19, 2018 1 Principl built-in types in Python (Python ) numerics: int, flot, long, complex sequences: str, unicode, list, tuple, byterry, buffer, xrnge mppings: dict files:

More information

Tool Vendor Perspectives SysML Thus Far

Tool Vendor Perspectives SysML Thus Far Frontiers 2008 Pnel Georgi Tec, 05-13-08 Tool Vendor Perspectives SysML Thus Fr Hns-Peter Hoffmnn, Ph.D Chief Systems Methodologist Telelogic, Systems & Softwre Modeling Business Unit Peter.Hoffmnn@telelogic.com

More information

Section 3.1: Sequences and Series

Section 3.1: Sequences and Series Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one

More information

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1 Mth 33 Volume Stewrt 5.2 Geometry of integrls. In this section, we will lern how to compute volumes using integrls defined by slice nlysis. First, we recll from Clculus I how to compute res. Given the

More information

1 Drawing 3D Objects in Adobe Illustrator

1 Drawing 3D Objects in Adobe Illustrator Drwing 3D Objects in Adobe Illustrtor 1 1 Drwing 3D Objects in Adobe Illustrtor This Tutoril will show you how to drw simple objects with three-dimensionl ppernce. At first we will drw rrows indicting

More information

McAfee Network Security Platform

McAfee Network Security Platform Revision D McAfee Network Security Pltform (NS5x00 Quick Strt Guide) This quick strt guide explins how to quickly set up nd ctivte your McAfee Network Security Pltform NS5100 nd NS5200 Sensors in inline

More information

View, evaluate, and publish assignments using the Assignment dropbox.

View, evaluate, and publish assignments using the Assignment dropbox. Blckord Lerning System CE 6 Mnging Assignments Competencies After reding this document, you will e le to: Crete ssignments using the Assignment tool. View, evlute, nd pulish ssignments using the Assignment

More information

Reference types and their characteristics Class Definition Constructors and Object Creation Special objects: Strings and Arrays

Reference types and their characteristics Class Definition Constructors and Object Creation Special objects: Strings and Arrays Objects nd Clsses Reference types nd their chrcteristics Clss Definition Constructors nd Object Cretion Specil objects: Strings nd Arrys OOAD 1999/2000 Cludi Niederée, Jochim W. Schmidt Softwre Systems

More information

E201 USB Encoder Interface

E201 USB Encoder Interface Dt sheet Issue 4, 24 th ugust 2015 E201 USB Encoder Interfce E201-9Q incrementl E201-9S bsolute bsolute SSI BiSS-C mode (unidirectionl) B Z Clock Dt M SLO The E201 is single chnnel USB encoder interfce

More information

Quiz2 45mins. Personal Number: Problem 1. (20pts) Here is an Table of Perl Regular Ex

Quiz2 45mins. Personal Number: Problem 1. (20pts) Here is an Table of Perl Regular Ex Long Quiz2 45mins Nme: Personl Numer: Prolem. (20pts) Here is n Tle of Perl Regulr Ex Chrcter Description. single chrcter \s whitespce chrcter (spce, t, newline) \S non-whitespce chrcter \d digit (0-9)

More information

COMMON HALF YEARLY EXAMINATION DECEMBER 2018

COMMON HALF YEARLY EXAMINATION DECEMBER 2018 li.net i.net li.net i.net li.net i.net li.net i.net li.net i.net li.net i.net li.net i.net li.net i.net li.net i.net.pds.pds COMMON HALF YEARLY EXAMINATION DECEMBER 2018 STD : XI SUBJECT: COMPUTER SCIENCE

More information

Easy Interactive Tools Ver.3.0 Operation Guide

Easy Interactive Tools Ver.3.0 Operation Guide Esy Interctive Tools Ver.3.0 Opertion Guide Esy Interctive Tools Summry 2 Fetures Esy Interctive Tools is n ppliction tht llows you to drw on projected imges. By using the interctive pen supplied with

More information

CPSC 213. Polymorphism. Introduction to Computer Systems. Readings for Next Two Lectures. Back to Procedure Calls

CPSC 213. Polymorphism. Introduction to Computer Systems. Readings for Next Two Lectures. Back to Procedure Calls Redings for Next Two Lectures Text CPSC 213 Switch Sttements, Understnding Pointers - 2nd ed: 3.6.7, 3.10-1st ed: 3.6.6, 3.11 Introduction to Computer Systems Unit 1f Dynmic Control Flow Polymorphism nd

More information

Data sharing in OpenMP

Data sharing in OpenMP Dt shring in OpenMP Polo Burgio polo.burgio@unimore.it Outline Expressing prllelism Understnding prllel threds Memory Dt mngement Dt cluses Synchroniztion Brriers, locks, criticl sections Work prtitioning

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

TO REGULAR EXPRESSIONS

TO REGULAR EXPRESSIONS Suject :- Computer Science Course Nme :- Theory Of Computtion DA TO REGULAR EXPRESSIONS Report Sumitted y:- Ajy Singh Meen 07000505 jysmeen@cse.iit.c.in BASIC DEINITIONS DA:- A finite stte mchine where

More information

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an

Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an Scnner Termintion A scnner reds input chrcters nd prtitions them into tokens. Wht hppens when the end of the input file is reched? It my be useful to crete n Eof pseudo-chrcter when this occurs. In Jv,

More information

CS 340, Fall 2014 Dec 11 th /13 th Final Exam Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.

CS 340, Fall 2014 Dec 11 th /13 th Final Exam Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string. CS 340, Fll 2014 Dec 11 th /13 th Finl Exm Nme: Note: in ll questions, the specil symol ɛ (epsilon) is used to indicte the empty string. Question 1. [5 points] Consider the following regulr expression;

More information

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded

More information

9 4. CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association

9 4. CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association 9. CISC - Curriculum & Instruction Steering Committee The Winning EQUATION A HIGH QUALITY MATHEMATICS PROFESSIONAL DEVELOPMENT PROGRAM FOR TEACHERS IN GRADES THROUGH ALGEBRA II STRAND: NUMBER SENSE: Rtionl

More information

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrd-coded using this

More information

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation Representtion of Numbers Number Representtion Computer represent ll numbers, other thn integers nd some frctions with imprecision. Numbers re stored in some pproximtion which cn be represented by fixed

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5 CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,

More information

Integration. September 28, 2017

Integration. September 28, 2017 Integrtion September 8, 7 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my

More information

Section 10.4 Hyperbolas

Section 10.4 Hyperbolas 66 Section 10.4 Hyperbols Objective : Definition of hyperbol & hyperbols centered t (0, 0). The third type of conic we will study is the hyperbol. It is defined in the sme mnner tht we defined the prbol

More information

Scanning Theory and Practice

Scanning Theory and Practice CHAPTER 3 Scnning Theory nd Prctice 3.1 Overview The primry function of scnner is to red in chrcters from source file nd group them into tokens. A scnner is sometimes clled lexicl nlyzer or lexer. The

More information

CMSC 331 First Midterm Exam

CMSC 331 First Midterm Exam 0 00/ 1 20/ 2 05/ 3 15/ 4 15/ 5 15/ 6 20/ 7 30/ 8 30/ 150/ 331 First Midterm Exm 7 October 2003 CMC 331 First Midterm Exm Nme: mple Answers tudent ID#: You will hve seventy-five (75) minutes to complete

More information

Summer Review Packet For Algebra 2 CP/Honors

Summer Review Packet For Algebra 2 CP/Honors Summer Review Pcket For Alger CP/Honors Nme Current Course Mth Techer Introduction Alger uilds on topics studied from oth Alger nd Geometr. Certin topics re sufficientl involved tht the cll for some review

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-188 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

9.1 apply the distance and midpoint formulas

9.1 apply the distance and midpoint formulas 9.1 pply the distnce nd midpoint formuls DISTANCE FORMULA MIDPOINT FORMULA To find the midpoint between two points x, y nd x y 1 1,, we Exmple 1: Find the distnce between the two points. Then, find the

More information

Outline. Tiling, formally. Expression tile as rule. Statement tiles as rules. Function calls. CS 412 Introduction to Compilers

Outline. Tiling, formally. Expression tile as rule. Statement tiles as rules. Function calls. CS 412 Introduction to Compilers CS 412 Introduction to Compilers Andrew Myers Cornell University Lectur8 Finishing genertion 9 Mr 01 Outline Tiling s syntx-directed trnsltion Implementing function clls Implementing functions Optimizing

More information

CMPSC 470: Compiler Construction

CMPSC 470: Compiler Construction CMPSC 47: Compiler Construction Plese complete the following: Midterm (Type A) Nme Instruction: Mke sure you hve ll pges including this cover nd lnk pge t the end. Answer ech question in the spce provided.

More information

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers?

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers? Questions About Numbers Number Systems nd Arithmetic or Computers go to elementry school How do you represent negtive numbers? frctions? relly lrge numbers? relly smll numbers? How do you do rithmetic?

More information

such that the S i cover S, or equivalently S

such that the S i cover S, or equivalently S MATH 55 Triple Integrls Fll 16 1. Definition Given solid in spce, prtition of consists of finite set of solis = { 1,, n } such tht the i cover, or equivlently n i. Furthermore, for ech i, intersects i

More information

UNIT 11. Query Optimization

UNIT 11. Query Optimization UNIT Query Optimiztion Contents Introduction to Query Optimiztion 2 The Optimiztion Process: An Overview 3 Optimiztion in System R 4 Optimiztion in INGRES 5 Implementing the Join Opertors Wei-Png Yng,

More information

5 Regular 4-Sided Composition

5 Regular 4-Sided Composition Xilinx-Lv User Guide 5 Regulr 4-Sided Composition This tutoril shows how regulr circuits with 4-sided elements cn be described in Lv. The type of regulr circuits tht re discussed in this tutoril re those

More information

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course

L. Yaroslavsky. Fundamentals of Digital Image Processing. Course L. Yroslvsky. Fundmentls of Digitl Imge Processing. Course 0555.330 Lecture. Imge enhncement.. Imge enhncement s n imge processing tsk. Clssifiction of imge enhncement methods Imge enhncement is processing

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Lecture T4: Pattern Matching

Lecture T4: Pattern Matching Introduction to Theoreticl CS Lecture T4: Pttern Mtching Two fundmentl questions. Wht cn computer do? How fst cn it do it? Generl pproch. Don t tlk bout specific mchines or problems. Consider miniml bstrct

More information

License Manager Installation and Setup

License Manager Installation and Setup The Network License (concurrent-user) version of e-dpp hs hrdwre key plugged to the computer running the License Mnger softwre. In the e-dpp terminology, this computer is clled the License Mnger Server.

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

LCI/USB LonWorks Commissioning Interface

LCI/USB LonWorks Commissioning Interface Works Commissioning Interfce Importnt: Retin these instructions CONTENTS 1 Unpcking... 1 2 Storing... 1 3 Instlltion... 1 4 Uninstlling the USB Drivers... 8 5 Disposl... 8 1 UNPACKING Instlltion Instructions

More information

vcloud Director Tenant Portal Guide vcloud Director 9.1

vcloud Director Tenant Portal Guide vcloud Director 9.1 vcloud Director Tennt Portl Guide vcloud Director 9.1 You cn find the most up-to-dte technicl documenttion on the VMwre website t: https://docs.vmwre.com/ If you hve comments bout this documenttion, submit

More information

CSE 401 Midterm Exam 11/5/10 Sample Solution

CSE 401 Midterm Exam 11/5/10 Sample Solution Question 1. egulr expressions (20 points) In the Ad Progrmming lnguge n integer constnt contins one or more digits, but it my lso contin embedded underscores. Any underscores must be preceded nd followed

More information

McAfee Network Security Platform

McAfee Network Security Platform NS7x00 Quick Strt Guide Revision D McAfee Network Security Pltform This quick strt guide explins how to quickly set up nd ctivte your McAfee Network Security Pltform NS7100, NS7200, nd NS7300 Sensors in

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Agilent G2724AA Spectrum Mill Extractor for Applied Biosystems/MDS Sciex QSTAR Data Files Quick Start Guide

Agilent G2724AA Spectrum Mill Extractor for Applied Biosystems/MDS Sciex QSTAR Data Files Quick Start Guide Agilent G2724AA Spectrum Mill Extrctor for Applied Biosystems/MDS Sciex QSTAR Dt Files Quick Strt Guide Wht is the Spectrum Mill QSTAR Dt Extrctor? Instlltion The Agilent Spectrum Mill MS Proteomics Workench

More information