{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture_2

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

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

Click to edit Master subtitle style 10/6/09 Lecture 2 Comp 116 Jan 21st , 2009

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

View Full Document
10/6/09 Objectives Assignment 0 Binary representation Vectors and Matrices
10/6/09 Assignment 0

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

View Full Document
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
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

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

View Full Document
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. :
10/6/09 Q.4 primes lookfor prime lookfor prime FACTOR Prime factors. ISPRIME True for prime numbers. PRIMES Generate list of prime numbers.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}