Presentation is loading. Please wait.

Presentation is loading. Please wait.

General Computer Science for Engineers CISC 106 Lecture 02 James Atlas Computer and Information Sciences.

Similar presentations


Presentation on theme: "General Computer Science for Engineers CISC 106 Lecture 02 James Atlas Computer and Information Sciences."— Presentation transcript:

1 General Computer Science for Engineers CISC 106 Lecture 02 James Atlas Computer and Information Sciences

2 CPU Disk Memory How does our program work?

3

4

5 1.~~~~~~~~~~ 2.~~~~~~~~~~ 3.~~~~~~~~~~ 4.~~~~~~~~~~ 5.~~~~~~~~~~ 6.~~~~~~~~~~ 7.~~~~~~~~~~ 8.~~~~~~~~~~... x86 instructions Our Program in Memory

6 Variables var = expression x = 2 * 2 comment = ‘This is a string’ area = circleArea(5) What type of data is stored in each variable?

7 How do computers store data? Binary ◦ Billions of tiny logic gates representing ON and OFF (1 and 0) Video ◦ http://www.youtube.com/watch?v=b6vHZ95XDwU

8 Data Types in Matlab Floating point number by default ◦ “double” precision = 64-bits of memory

9 Operations on Data Types 5.5 single(5.5) int8(5) int8(500) ? int8(‘c’) ? char(98) ? >> x = 5.5 >> whos x

10 Expressions Data and Operator ◦ 2 + 2 ◦ circleArea(5)

11 Expressions Data and Operator ◦ 2 + 2 ◦ circleArea(5) Nested Expressions ◦ circleArea(circleArea(5 + 2) + circleArea(3))

12 Expressions Data and Operator ◦ 2 + 2 ◦ circleArea(5) Nested Expressions ◦ circleArea(circleArea(5 + 2) + circleArea(3)) Expressions produce a value

13 Lab00 (pre-lab) / Lab01

14 Using Matlab Remotely (text) ssh yourusername@strauss.udel.edu ◦ requires an ssh program such as PuTTY ◦ see course website for installation details at prompt type: matlab -nodesktop

15 Using Matlab Remotely (GUI) Mac users: ◦ You already have an X-Windows environment PC users: ◦ You must setup Cygwin-X ◦ Download Cygwin setup.exe from: http://www.cygwin.com/ ◦ Run setup.exe and select additional packages for:  xauth  xinit  openssh

16 Running Matlab Remotely Once the X-Windows environment is setup, open a terminal window and login to strauss: ◦ ssh -YC yourusername@strauss.udel.edu Now start Matlab: ◦ matlab & What does the & do?


Download ppt "General Computer Science for Engineers CISC 106 Lecture 02 James Atlas Computer and Information Sciences."

Similar presentations


Ads by Google