{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture_2 - Lecture 2 Comp 116 Jan 21st 2009 Objectives...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 10/6/09 Lecture 2 Comp 116 Jan 21st , 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10/6/09 Objectives Assignment 0 Binary representation Vectors and Matrices
Background image of page 2
10/6/09 Assignment 0
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10/6/09 Q. 2 Data types Difference between single and double? Internal representation 4 vs 8 bytes Number of bits for each part Range realmin(‘single’ ) 1.1754944e- 038 realmax(‘singl e)’ 3.4028235e+0 38 realmin(‘double’) 2.225073858507201e -308 realmax(‘double)’ 1.797693134862316e +308
Background image of page 4
10/6/09 Q. 2 Values/types a*b two variables of unknown types (numeric) newvariable = 6.023e23 Using a constant Assignment (and/or) creating a new variable Type? Double a = a + 1
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
10/6/09 Q. 3 Images imread image img = imread(‘image.jpg’); lookfor image : IM2JAVA Convert image to Java image. IMAGE Display image. IMAGESC Scale data and display as image. :
Background image of page 6
10/6/09 Q.4 primes lookfor prime lookfor prime FACTOR Prime factors. ISPRIME True for prime numbers. PRIMES Generate list of prime numbers.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}