general computer science for engineers cisc 106 lecture 02 n.
Download
Skip this Video
Download Presentation
General Computer Science for Engineers CISC 106 Lecture 02

Loading in 2 Seconds...

play fullscreen
1 / 16

General Computer Science for Engineers CISC 106 Lecture 02 - PowerPoint PPT Presentation


  • 74 Views
  • Uploaded on

General Computer Science for Engineers CISC 106 Lecture 02. James Atlas Computer and Information Sciences. How does our program work?. CPU Disk Memory. Our Program in Memory. x86 instructions. ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'General Computer Science for Engineers CISC 106 Lecture 02' - aiko-tran


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
general computer science for engineers cisc 106 lecture 02

General Computer Science for EngineersCISC 106Lecture 02

James Atlas

Computer and Information Sciences

slide5

Our Program in Memory

x86 instructions

  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • ~~~~~~~~~~
  • . . .
variables
Variables
  • var = expression
  • x = 2 * 2
  • comment = ‘This is a string’
  • area = circleArea(5)

What type of data is stored in each variable?

how do computers store data
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
data types in matlab
Data Types in Matlab
  • Floating point number by default
    • “double” precision = 64-bits of memory
operations on data types
Operations on Data Types
  • 5.5
  • single(5.5)
  • int8(5)
  • int8(500) ?
  • int8(‘c’) ?
  • char(98) ?

>> x = 5.5

>> whos x

expressions
Expressions
  • Data and Operator
    • 2 + 2
    • circleArea(5)
expressions1
Expressions
  • Data and Operator
    • 2 + 2
    • circleArea(5)
  • Nested Expressions
    • circleArea(circleArea(5 + 2) + circleArea(3))
expressions2
Expressions
  • Data and Operator
    • 2 + 2
    • circleArea(5)
  • Nested Expressions
    • circleArea(circleArea(5 + 2) + circleArea(3))
  • Expressions produce a value
using matlab remotely text
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

using matlab remotely gui
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
running matlab remotely
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?