Matlab Training Session 10: Loading Binary Data. Course Website: Training Sessions.htm
|
|
- Cora Hart
- 7 years ago
- Views:
Transcription
1 Matlab Training Session 10: Loading Binary Data Course Website: Training Sessions.htm
2 Course Outline Term 1 1. Introduction to Matlab and its Interface 2. Fundamentals (Operators) 3. Fundamentals (Flow) 4. Importing Data 5. Functions and M-Files 6. Plotting (2D and 3D) 7. Plotting (2D and 3D) 8. Statistical Tools in Matlab Term 2 9. Term 1 review 10. Loading Binary Data Weeks Topics: Statistics, Creating Gui s, Exponential curve fitting.
3 Week 5 Lecture Outline loading Binary Data A. Week 5 Review Importing Text Data B. Binary Encoding C. Binary Data Formats D. Exercise
4 Basic issue: A. Week 5 Review: Importing Text Data How do we get data from other sources into Matlab so that we can play with it? Other Issues: Where do we get the data? What types of data can we import?
5 Lots of options to load files load for basics fscanf for complex textread for any text xlsread for Excel worksheets
6 load Command opens and imports data from a standard ASCII file into a matlab variable Usage: var_name = load( filename ) Restrictions Data must be constantly sized Data must be ASCII No other characters
7 load Works for simple and unstructured code Powerful and easy to use but limited Will likely force you to manually handle simplifying data which is prone to error More complex functions are more flexible
8 File Handling f* functions are associated with file opening, reading, manipulating, writing, Basic Functions of Interest for opening and reading generic files in matlab fopen fclose fseek/ftell/frewind fscanf fgetl
9 fopen Opens a file object in matlab that points to the file of interest fid = fopen( filepath ) fid is an integer that represents the file Can open multiple files and matlab will assign unique fids
10 fclose When you are done with a file, it is a good idea to close it especially if you are opening many files fclose(fid)
11 What is a File? A specific organization of data In matlab it is identified with a fid Location is specified with a pointer that can be moved around fid Pointer file_name
12 Moving the Pointer We already know how to assign a fid (fopen) To find where the file is pointing: x = ftell(fid) To point somewhere else fseek(fid,offset,origin) Move pointer in file fid by offset relative to origin Origin can be beginning, current, end of file To point to the beginning frewind(fid)
13 Getting Data Why move the pointer around? Get somewhere in the file from where you want data fscanf(fid,format,size) Format You have to tell matlab the type of data it should be expecting in the text file so that it can convert it %d, %f, %c Size You can specify how to organize the imported data [m,n] import the data as m by n, n can be infinite Be careful because matlab will mangle your data and not tell you
14 Getting Data fgetl returns the next line of the file as a character array You may need to convert these to numbers >> fid1 = fopen( test1.txt ); >> a_str = fgetl(fid1) a_str = 1 2 >> a_num = str2num(a_str) a_num = [1 2]
15 B. Binary Encoding All data files are binary encoded ASCII text format is generally the easiest because it is relatively simple, easy to visualize in a text editor, and is a common output format BUT ASCII text is not the fastest or the most efficient way of encoding data Not all data files are ASCII!
16 B. Binary Encoding Binary data consists of sequences of 0 s and 1 s Depending on the encoding used, individual meaningful values will occur every 4, 8, 16, 32 or 64 bits For a tutorial on converting between binary and decimal numbers see:
17 B. Binary Encoding Binary data consists of sequences of 0 s and 1 s Depending on the encoding used, individual meaningful values will occur every 4, 8, 16 or 32 bits
18 B. Binary Encoding Binary data consists of sequences of 0 s and 1 s Depending on the encoding used, individual meaningful values will occur every 4, 8, 16 or 32 bits
19 B. Binary Encoding Binary data consists of sequences of 0 s and 1 s Depending on the encoding used, individual meaningful values will occur every 4, 8, 16 or 32 bits
20 B. Binary Encoding Each group of bits can represent a value, character, delimiter, command, instruction ect. Generally binary data is divided into 8 bit (1 byte) segments = zero = 255 IT IS VERY IMPORTANT TO KNOW WHAT FORMAT THE DATA IS IN BEFORE YOU CAN READ IT!
21 ASCII ENCODING ASCII: American Standard Code for Information Interchange (1968). ASCII every character is coded by only seven bits of information. The eighth bit is ignored (it can be a zero or one). ASCII consists of 127 characters which include uppercase, lowercase, spaces and formatting characters See for the full ascii table
22 ASCII vs Simple Binary Encoding ASCII requires 1 byte to be used for every character Data Table: In ascii 1 byte is used for every character, space and carriage return = 23 bytes If this was encoded in a simple 8 bit binary representation this would only use 11 bytes (1 byte for every number and space)
23 Binary Precision The number of bits used to represent a value determines how large or small that value can be 8 bits 0 to bits 0 to bits 0 to e+009 Precision also determines how many decimal places can be represented
24 C. Binary Formats: Integers and Characters 'schar' Signed character; 8 bits 'uchar' Unsigned character; 8 bits 'int8' Integer; 8 bits 'int16' Integer; 16 bits 'int32' Integer; 32 bits 'int64' Integer; 64 bits 'uint8' Unsigned integer; 8 bits 'uint16' Unsigned integer; 16 bits 'uint32' Unsigned integer; 32 bits 'uint64' Unsigned integer; 64 bits * The first bit denotes the sign if the integer or character is signed.
25 Readable Binary Data Formats Floating Point Representation Used for numbers that require decimal representation (real numbers) Established by IEEE (Institute of Electrical and Electronics Engineers ) Encoded in 32 (single precision) or 64 bits (double precision) Single precision(short): 32 bits 1 bit for the sign, 8 bits for the exponent, and 23 bits for the mantissa. Double precision(long) Real: 64 bits 1 bit for the sign, 11 bits for the exponent, and 52 bits for the mantissa.
26 Readable Binary Data Formats Floating Point Representation By default matlab stores all values with double precision The functions realmax and realmin return max and min value representations 'float32, single 'float64', 'double' Floating-point; 32 bits Floating-point; 64 bits
27 Specifying Machine Formats The computer system used to record or save the binary data in unique addressing orders In order to load binary data from a particular system, Matlab needs to know the machine format You can use the fopen function to determine the machine format [filename, mode, machineformat] = fopen(fid)
28 Binary File Machine Formats 'ieee-be' or 'b : IEEE floating point with big-endian byte ordering 'ieee-le' or 'l' : IEEE floating point with little-endian byte ordering 'ieee-be.l64' or 's : IEEE floating point with big-endian byte ordering and 64-bit long data type 'ieee-le.l64' or 'a : IEEE floating point with little-endian byte ordering 'native' or 'n' : 'vaxd' or 'd' : 'vaxg' or 'g' : and 64-bit long data type Numeric format of the machine on which MATLAB is running (the default) VAX D floating point and VAX ordering VAX G floating point and VAX ordering
29 Reading Binary Data The function fread() performs all binary data reading in matlab Syntax A = fread(fid) A = fread(fid, count) A = fread(fid, count, precision) A = fread(fid, count, precision, skip) A = fread(fid, count, precision, skip, machineformat) [A, count] = fread(...)
30 Reading Binary Data Input Arguments: Count: Precision: Skip: MachineFormat: x: read x elements Inf: read to end of file [m,n]: read enough to fill a m by n matrix Specify input data format eg. Int8, int16, short, long see previous slides Skip specified number of bits between segments specified by the Precision argument Specify machine format 'ieee-be, 'ieee-le.. See previous slides
31 Exercise Load and plot position data saved in: week10data.rob This file contains binary position data saved in 32 bit floating point format precision 1. Use the fopen function to determine the machine format hint: [fname, mode, mformat] = fopen(fid) 2. Load the data using the fread function 3. Plot the position 4. Try loading the data with an incorrect argument to see how this changes/corrupts the data
32 Exercise Solution fid = fopen('week10data.rob','r') %open file for reading %Determine file format [fname, mode, mformat] = fopen(fid) %Format is ieee-le %Read binary data pos_data = fread(fid, inf, 'single', 'ieee-le') plot(pos_data) % plot position data fclose(fid) % close file
33 Help and Documentation Digital Getting Help 1. Accessible Help from the Matlab Start Menu 2. Updated online help from the Matlab Mathworks website: 3. Matlab command prompt function lookup 4. Built in Demo s 5. Websites Hard Copy 3. Books, Guides, Reference The Student Edition of Matlab pub. Mathworks Inc.
Number Representation
Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data
More informationNumerical Matrix Analysis
Numerical Matrix Analysis Lecture Notes #10 Conditioning and / Peter Blomgren, blomgren.peter@gmail.com Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research
More informationBinary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1
Binary Number System 1 Base 10 digits: 0 1 2 3 4 5 6 7 8 9 Base 2 digits: 0 1 Recall that in base 10, the digits of a number are just coefficients of powers of the base (10): 417 = 4 * 10 2 + 1 * 10 1
More informationStoring Measurement Data
Storing Measurement Data File I/O records or reads data in a file. A typical file I/O operation involves the following process. 1. Create or open a file. Indicate where an existing file resides or where
More informationThe use of binary codes to represent characters
The use of binary codes to represent characters Teacher s Notes Lesson Plan x Length 60 mins Specification Link 2.1.4/hi Character Learning objective (a) Explain the use of binary codes to represent characters
More informationHOMEWORK # 2 SOLUTIO
HOMEWORK # 2 SOLUTIO Problem 1 (2 points) a. There are 313 characters in the Tamil language. If every character is to be encoded into a unique bit pattern, what is the minimum number of bits required to
More informationData Storage: Each time you create a variable in memory, a certain amount of memory is allocated for that variable based on its data type (or class).
Data Storage: Computers are made of many small parts, including transistors, capacitors, resistors, magnetic materials, etc. Somehow they have to store information in these materials both temporarily (RAM,
More informationECE 0142 Computer Organization. Lecture 3 Floating Point Representations
ECE 0142 Computer Organization Lecture 3 Floating Point Representations 1 Floating-point arithmetic We often incur floating-point programming. Floating point greatly simplifies working with large (e.g.,
More informationNumbering Systems. InThisAppendix...
G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal
More informationBachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)
Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating
More informationBase Conversion written by Cathy Saxton
Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x
More informationCaml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr
Caml Virtual Machine File & data formats Document version: 1.4 http://cadmium.x9c.fr Copyright c 2007-2010 Xavier Clerc cadmium@x9c.fr Released under the LGPL version 3 February 6, 2010 Abstract: This
More information1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:
Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of
More informationData Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:
Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how
More informationThe string of digits 101101 in the binary number system represents the quantity
Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for
More informationThe programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
More informationThe New IoT Standard: Any App for Any Device Using Any Data Format. Mike Weiner Product Manager, Omega DevCloud KORE Telematics
The New IoT Standard: Any App for Any Device Using Any Data Format Mike Weiner Product Manager, Omega DevCloud KORE Telematics About KORE The world s largest M2M/IoT services provider 12 Carriers Enterprise
More information2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal
2/9/9 Binary number system Computer (electronic) systems prefer binary numbers Binary number: represent a number in base-2 Binary numbers 2 3 + 7 + 5 Some terminology Bit: a binary digit ( or ) Hexadecimal
More informationEmbedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C
Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection
More informationChapter 4: Computer Codes
Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data
More informationComputers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer
Computers CMPT 125: Lecture 1: Understanding the Computer Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University January 3, 2009 A computer performs 2 basic functions: 1.
More informationThe Answer to the 14 Most Frequently Asked Modbus Questions
Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in
More informationOct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8
ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also
More informationFast Arithmetic Coding (FastAC) Implementations
Fast Arithmetic Coding (FastAC) Implementations Amir Said 1 Introduction This document describes our fast implementations of arithmetic coding, which achieve optimal compression and higher throughput by
More informationComputer Science 281 Binary and Hexadecimal Review
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
More informationSources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
More informationLSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology
LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3
More informationData Storage 3.1. Foundations of Computer Science Cengage Learning
3 Data Storage 3.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List five different data types used in a computer. Describe how
More informationCSI 333 Lecture 1 Number Systems
CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...
More informationDATA_TYPE Values and Data File Storage Formats
Chapter 3. DATA_TYPE Values and Data File Storage Formats 3-1 Chapter 3. DATA_TYPE Values and Data File Storage Formats Each PDS archived product is described using label objects that provide information
More informationVersion 4 MAT-File Format
Version 4 MAT-File Format Note This section is taken from the MATLAB V4.2 External Interface Guide, which is no longer available in printed form. This section presents the internal structure of Level 1.0
More informationLecture 2. Binary and Hexadecimal Numbers
Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations
More informationThis section describes how LabVIEW stores data in memory for controls, indicators, wires, and other objects.
Application Note 154 LabVIEW Data Storage Introduction This Application Note describes the formats in which you can save data. This information is most useful to advanced users, such as those using shared
More informationName: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
More informationThis 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30));
Introduction to Embedded Microcomputer Systems Lecture 5.1 2.9. Conversions ASCII to binary n = 100*(Data[0]-0x30) + 10*(Data[1]-0x30) + (Data[2]-0x30); This 3-digit ASCII string could also be calculated
More informationVersion 1.5 Satlantic Inc.
SatCon Data Conversion Program Users Guide Version 1.5 Version: 1.5 (B) - March 09, 2011 i/i TABLE OF CONTENTS 1.0 Introduction... 1 2.0 Installation... 1 3.0 Glossary of terms... 1 4.0 Getting Started...
More informationMATLAB Data Import and Export. R2011b
MATLAB Data Import and Export R2011b How to Contact MathWorks www.mathworks.com Web comp.soft-sys.matlab Newsgroup www.mathworks.com/contact_ts.html Technical Support suggest@mathworks.com bugs@mathworks.com
More informationAMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables
AMATH 352 Lecture 3 MATLAB Tutorial MATLAB (short for MATrix LABoratory) is a very useful piece of software for numerical analysis. It provides an environment for computation and the visualization. Learning
More informationIntroduction to Python
Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment
More informationCS 223B: Introduction to Computer Vision Carlo Tomasi Stanford University Matlab and Images Matlab is a simple and useful high-level language for matrix manipulation. Since images are matrices of numbers,
More informationIBM Emulation Mode Printer Commands
IBM Emulation Mode Printer Commands Section 3 This section provides a detailed description of IBM emulation mode commands you can use with your printer. Control Codes Control codes are one-character printer
More informationMATLAB: Strings and File IO
MATLAB: Strings and File IO Kipp Martin University of Chicago Booth School of Business February 9, 2012 The M-files The following files are used in this lecture. filein.txt fileio.m Outline Strings File
More informationMACHINE INSTRUCTIONS AND PROGRAMS
CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations
More informationDBF Chapter. Note to UNIX and OS/390 Users. Import/Export Facility CHAPTER 7
97 CHAPTER 7 DBF Chapter Note to UNIX and OS/390 Users 97 Import/Export Facility 97 Understanding DBF Essentials 98 DBF Files 98 DBF File Naming Conventions 99 DBF File Data Types 99 ACCESS Procedure Data
More informationPemrograman Dasar. Basic Elements Of Java
Pemrograman Dasar Basic Elements Of Java Compiling and Running a Java Application 2 Portable Java Application 3 Java Platform Platform: hardware or software environment in which a program runs. Oracle
More informationOutline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage
Outline 1 Computer Architecture hardware components programming environments 2 Getting Started with Python installing Python executing Python code 3 Number Systems decimal and binary notations running
More informationHP Service Virtualization
HP Service Virtualization Fixed Length Protocol Virtualization SV Training September 2014 Fixed Length Protocol Virtualization Technology Description Use Cases Supported Message Structures SV Service Description
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationTo convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:
Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents
More informationPL / SQL Basics. Chapter 3
PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic
More informationIntroduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.
1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays
More informationBeginner s Matlab Tutorial
Christopher Lum lum@u.washington.edu Introduction Beginner s Matlab Tutorial This document is designed to act as a tutorial for an individual who has had no prior experience with Matlab. For any questions
More informationThe Hexadecimal Number System and Memory Addressing
APPENDIX C The Hexadecimal Number System and Memory Addressing U nderstanding the number system and the coding system that computers use to store data and communicate with each other is fundamental to
More informationBinary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.
Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems
More informationUniversity of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python
Introduction Welcome to our Python sessions. University of Hull Department of Computer Science Wrestling with Python Week 01 Playing with Python Vsn. 1.0 Rob Miles 2013 Please follow the instructions carefully.
More informationsqlite driver manual
sqlite driver manual A libdbi driver using the SQLite embedded database engine Markus Hoenicka mhoenicka@users.sourceforge.net sqlite driver manual: A libdbi driver using the SQLite embedded database engine
More informationLevent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC
Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n
More informationIntroduction to Matlab
Introduction to Matlab Social Science Research Lab American University, Washington, D.C. Web. www.american.edu/provost/ctrl/pclabs.cfm Tel. x3862 Email. SSRL@American.edu Course Objective This course provides
More information1 Description of The Simpletron
Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies
More informationDNA Data and Program Representation. Alexandre David 1.2.05 adavid@cs.aau.dk
DNA Data and Program Representation Alexandre David 1.2.05 adavid@cs.aau.dk Introduction Very important to understand how data is represented. operations limits precision Digital logic built on 2-valued
More informationMeasures of Error: for exact x and approximation x Absolute error e = x x. Relative error r = (x x )/x.
ERRORS and COMPUTER ARITHMETIC Types of Error in Numerical Calculations Initial Data Errors: from experiment, modeling, computer representation; problem dependent but need to know at beginning of calculation.
More informationModule 816. File Management in C. M. Campbell 1993 Deakin University
M. Campbell 1993 Deakin University Aim Learning objectives Content After working through this module you should be able to create C programs that create an use both text and binary files. After working
More informationAdvanced Tutorials. Numeric Data In SAS : Guidelines for Storage and Display Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD
Numeric Data In SAS : Guidelines for Storage and Display Paul Gorrell, Social & Scientific Systems, Inc., Silver Spring, MD ABSTRACT Understanding how SAS stores and displays numeric data is essential
More information6.1. The Exponential Function. Introduction. Prerequisites. Learning Outcomes. Learning Style
The Exponential Function 6.1 Introduction In this block we revisit the use of exponents. We consider how the expression a x is defined when a is a positive number and x is irrational. Previously we have
More informationInstruction Set Architecture (ISA)
Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine
More informationMATLAB Programming. Problem 1: Sequential
Division of Engineering Fundamentals, Copyright 1999 by J.C. Malzahn Kampe 1 / 21 MATLAB Programming When we use the phrase computer solution, it should be understood that a computer will only follow directions;
More informationIllustration 1: Diagram of program function and data flow
The contract called for creation of a random access database of plumbing shops within the near perimeter of FIU Engineering school. The database features a rating number from 1-10 to offer a guideline
More informationIntroduction to Python
WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language
More information2 Matlab Programming, IO, and strings
2 Matlab Programming, IO, and strings Programming is the basic skill for implementing numerical methods. In this chapter we describe the fundamental programming constructs used in MATLAB and present examples
More informationA White Paper about. MiniSEED for LISS and data compression using Steim1 and Steim2
Contents Norwegian National Seismic Network Technical Report No. 20 A White Paper about MiniSEED for LISS and data compression using Steim1 and Steim2 version 01.00 Prepared by Mauro Mariotti SARA snc
More informationArithmetic in MIPS. Objectives. Instruction. Integer arithmetic. After completing this lab you will:
6 Objectives After completing this lab you will: know how to do integer arithmetic in MIPS know how to do floating point arithmetic in MIPS know about conversion from integer to floating point and from
More informationII-9Importing and Exporting Data
Chapter II-9 II-9Importing and Exporting Data Loading Waves... 141 Load Waves Submenu... 142 Number Formats... 143 The End of the Line... 143 Loading Delimited Text Files... 143 Date/Time Formats... 144
More informationCS321. Introduction to Numerical Methods
CS3 Introduction to Numerical Methods Lecture Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506-0633 August 7, 05 Number in
More informationASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6)
ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) 1 COMPUTER LANGUAGES In order for a computer to be able to execute a program, the program must first be present
More informationPython for Scientific Computing. http://bender.astro.sunysb.edu/classes/python-science
http://bender.astro.sunysb.edu/classes/python-science Course Goals Simply: to learn how to use python to do Numerical analysis Data analysis Plotting and visualizations Symbol mathematics Write applications...
More informationChapter 2: Basics on computers and digital information coding. A.A. 2012-2013 Information Technology and Arts Organizations
Chapter 2: Basics on computers and digital information coding Information Technology and Arts Organizations 1 Syllabus (1/3) 1. Introduction on Information Technologies (IT) and Cultural Heritage (CH)
More informationFigure 1: Graphical example of a mergesort 1.
CSE 30321 Computer Architecture I Fall 2011 Lab 02: Procedure Calls in MIPS Assembly Programming and Performance Total Points: 100 points due to its complexity, this lab will weight more heavily in your
More informationLab 4: Socket Programming: netcat part
Lab 4: Socket Programming: netcat part Overview The goal of this lab is to familiarize yourself with application level programming with sockets, specifically stream or TCP sockets, by implementing a client/server
More information1 The Java Virtual Machine
1 The Java Virtual Machine About the Spec Format This document describes the Java virtual machine and the instruction set. In this introduction, each component of the machine is briefly described. This
More informationIntel Hexadecimal Object File Format Specification Revision A, 1/6/88
Intel Hexadecimal Object File Format Specification Revision A, 1/6/88 DISCLAIMER Intel makes no representation or warranties with respect to the contents hereof and specifically disclaims any implied warranties
More informationB&K Precision 1785B, 1786B, 1787B, 1788 Power supply Python Library
B&K Precision 1785B, 1786B, 1787B, 1788 Power supply Python Library Table of Contents Introduction 2 Prerequisites 2 Why a Library is Useful 3 Using the Library from Python 6 Conventions 6 Return values
More informationQ&As: Microsoft Excel 2013: Chapter 2
Q&As: Microsoft Excel 2013: Chapter 2 In Step 5, why did the date that was entered change from 4/5/10 to 4/5/2010? When Excel recognizes that you entered a date in mm/dd/yy format, it automatically formats
More informationComputer Science 217
Computer Science 217 Midterm Exam Fall 2009 October 29, 2009 Name: ID: Instructions: Neatly print your name and ID number in the spaces provided above. Pick the best answer for each multiple choice question.
More informationFile Handling. What is a file?
File Handling 1 What is a file? A named collection of data, stored in secondary storage (typically). Typical operations on files: Open Read Write Close How is a file stored? Stored as sequence of bytes,
More informationHow To Write Portable Programs In C
Writing Portable Programs COS 217 1 Goals of Today s Class Writing portable programs in C Sources of heterogeneity Data types, evaluation order, byte order, char set, Reading period and final exam Important
More informationBinary Numbering Systems
Binary Numbering Systems April 1997, ver. 1 Application Note 83 Introduction Binary numbering systems are used in virtually all digital systems, including digital signal processing (DSP), networking, and
More informationTitle. Syntax. stata.com. odbc Load, write, or view data from ODBC sources. List ODBC sources to which Stata can connect odbc list
Title stata.com odbc Load, write, or view data from ODBC sources Syntax Menu Description Options Remarks and examples Also see Syntax List ODBC sources to which Stata can connect odbc list Retrieve available
More informationplc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationLecture 22: C Programming 4 Embedded Systems
Lecture 22: C Programming 4 Embedded Systems Today s Goals Basic C programming process Variables and constants in C Pointers to access addresses Using a High Level Language High-level languages More human
More informationChapter 7D The Java Virtual Machine
This sub chapter discusses another architecture, that of the JVM (Java Virtual Machine). In general, a VM (Virtual Machine) is a hypothetical machine (implemented in either hardware or software) that directly
More information1.Eastron SDM220Modbus Smart Meter Modbus Protocol Implementation V1.0
1.Eastron SDM220Modbus Smart Meter Modbus Protocol Implementation V1.0 1.1 Modbus Protocol Overview This section provides basic information for interfacing the Eastron Smart meter to a Modbus Protocol
More informationµtasker Document FTP Client
Embedding it better... µtasker Document FTP Client utaskerftp_client.doc/1.01 Copyright 2012 M.J.Butcher Consulting Table of Contents 1. Introduction...3 2. FTP Log-In...4 3. FTP Operation Modes...4 4.
More informationAs previously noted, a byte can contain a numeric value in the range 0-255. Computers don't understand Latin, Cyrillic, Hindi, Arabic character sets!
Encoding of alphanumeric and special characters As previously noted, a byte can contain a numeric value in the range 0-255. Computers don't understand Latin, Cyrillic, Hindi, Arabic character sets! Alphanumeric
More informationGUI Input and Output. Greg Reese, Ph.D Research Computing Support Group Academic Technology Services Miami University
GUI Input and Output Greg Reese, Ph.D Research Computing Support Group Academic Technology Services Miami University GUI Input and Output 2010-13 Greg Reese. All rights reserved 2 Terminology User I/O
More informationPROBLEMS (Cap. 4 - Istruzioni macchina)
98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary
More informationEverything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6
Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6 Number Systems No course on programming would be complete without a discussion of the Hexadecimal (Hex) number
More informationFAST INVERSE SQUARE ROOT
FAST INVERSE SQUARE ROOT CHRIS LOMONT Abstract. Computing reciprocal square roots is necessary in many applications, such as vector normalization in video games. Often, some loss of precision is acceptable
More informationAn overview of FAT12
An overview of FAT12 The File Allocation Table (FAT) is a table stored on a hard disk or floppy disk that indicates the status and location of all data clusters that are on the disk. The File Allocation
More informationIowa State University Electrical and Computer Engineering. E E 452. Electric Machines and Power Electronic Drives. Laboratory #3 Figures of Merit
Electrical and Computer Engineering E E 452. Electric Machines and Power Electronic Drives Laboratory #3 Figures of Merit Summary Simple experiments will be conducted. Experimental waveforms will be measured,
More information