APL and J Functional programming with linear algebra Large set of primitive operations Very compact program representation Regular grammar, uniform abbreviation.

Slides:



Advertisements
Similar presentations
K The Common Core State Standards in Mathematics © Copyright 2011 Institute for Mathematics and Education Welcome to a clickable.
Advertisements

Arrays.
Let’s Do Algebra Tiles Algebra Tiles Manipulatives used to enhance student understanding of subject traditionally taught at symbolic level. Provide access.
1 C Fundamentals - I Math 130 Lecture # 2 B Smith: Sp05: With discussion on labs, this took 53 minutes. Score 3. Many caveats. B Smith: Sp05: With discussion.
Types and Arithmetic Operators
Slide deck by Dr. Greg Reese Miami University MATLAB An Introduction With Applications, 5 th Edition Dr. Amos Gilat The Ohio State University Chapter 3.
08/30/00 Dinesh Manocha, COMP258 Hermite Curves A mathematical representation as a link between the algebraic & geometric form Defined by specifying the.
Lecture 4 Sept 8 Complete Chapter 3 exercises Chapter 4.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming Expressions and Operators Program Style.
Data types and variables
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Concatenation MATLAB lets you construct a new vector by concatenating other vectors: – A = [B C D... X Y Z] where the individual items in the brackets.
JavaScript, Fourth Edition
Chapter 2 Data Types, Declarations, and Displays
JavaScript, Third Edition
THE REAL NUMBERS College Algebra. Sets Set notation Union of sets Intersection of sets Subsets Combinations of three or more sets Applications.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
MATH – High School Common Core Vs Kansas Standards.
2010 New Math Standards. Mathematical Practices 1. Attend to precision 2. Construct viable arguments and critique the reasoning of others 3. Make sense.
5.7 Rational Exponents Fraction Exponents.
1 1.0 Students solve equations and inequalities involving absolute value. Algebra 2 Standards.
Numbers and Quantity Extend the Real Numbers to include work with rational exponents and study of the properties of rational and irrational numbers Use.
Objectives You should be able to describe: Data Types
MATLAB Basics With a brief review of linear algebra by Lanyi Xu modified by D.G.E. Robertson.
1 Week 12 Arrays, vectors, matrices and cubes. Introduction to Scientific & Engineering Computing 2 Array subscript expressions n Each subscript in an.
Matlab tutorial course Lesson 2: Arrays and data types
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
College of Nanoscale Science and Engineering A uniform algebraically-based approach to computational physics and efficient programming James E. Raynolds.
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
Computers Data Representation Chapter 3, SA. Data Representation and Processing Data and information processors must be able to: Recognize external data.
CSE123 Lecture 5 Arrays and Array Operations. Definitions Scalars: Variables that represent single numbers. Note that complex numbers are also scalars,
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Algebraic Expressions & Polynomials
Simplify Rational Algebraic Expressions In the previous section on polynomials, we divided a polynomial by a binomial using long division. In this section,
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Rational Exponents Fraction Exponents.
Exponent Rules and Dividing Polynomials Divide exponential forms with the same base. 2.Divide numbers in scientific notation. 3. Divide monomials.
Section 4.1 The Product, Quotient, and Power Rules for Exponents.
Examples of linear transformation matrices Some special cases of linear transformations of two-dimensional space R 2 are illuminating:dimensional Dimoffree.svgDimoffree.svg‎
Chapter 5 Polynomials: An Introduction to Algebra.
Python Mini-Course University of Oklahoma Department of Psychology Lesson 21 NumPy 6/11/09 Python Mini-Course: Lesson 21 1.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
C++ for Engineers and Scientists Second Edition
Mod-2 Vector Arithmetic For 2 binary n-vectors a and b –All components of a and b are elements of {0,1} –The mod-2 sum, c = a+b is term-by-term mod-2 sum.
System To Generate Test Data: The Analysis Program Syed Nabeel.
Modeling K The Common Core State Standards in Mathematics Geometry Measurement and Data The Number System Number and Operations.
Arrays Declaring arrays Passing arrays to functions Searching arrays with linear search Sorting arrays with insertion sort Multidimensional arrays Programming.
MULTI-DIMENSIONAL ARRAYS 1. Multi-dimensional Arrays The types of arrays discussed so far are all linear arrays. That is, they all dealt with a single.
Rational (fraction) Exponents Please READ as well as take notes & complete the problems followed in these slides.
LINEAR MODELS AND MATRIX ALGEBRA
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 8 Linear Algebraic Equations and Matrices.
1Object-Oriented Program Development Using C++ Built-in Data Types Data type –Range of values –Set of operations on those values Literal: refers to acceptable.
Lecture 1 Linear algebra Vectors, matrices. Linear algebra Encyclopedia Britannica:“a branch of mathematics that is concerned with mathematical structures.
Section 3.4 Zeros of Polynomial Functions. The Rational Zero Theorem.
ALGEBRIC EQUATIONS UNIT 01 LESSON 02. OBJECTIVES Students will be able to: Apply the Algebraic expressions to simplify algebraic expressions. Produce.
Linear Algebra review (optional)
Simplifying Rational Expressions
Expressions An expression is a portion of a C++ statement that performs an evaluation of some kind Generally requires that a computation or data manipulation.
College Algebra Real Number System, Algebraic Expressions, Exponents, Polynomials, Factoring, Rational Expressions, Radicals, Complex Numbers.
Sec P.1 Cont Sec, P.1 cont..
1-7: The Distributive Property
Zeros of a Polynomial Function
Fundamental Theorem of Algebra
Expressions.
Math review - scalars, vectors, and matrices
SKILLS PRACTICE SHEET RULES OF ARITHMETIC
Presentation transcript:

APL and J Functional programming with linear algebra Large set of primitive operations Very compact program representation Regular grammar, uniform abbreviation rules Functions restricted to unary and binary forms (monadic and dyadic) Uniform naming rules for formals simplifies function composition Interactive, interpreted, dynamically typed, garbage- collected

What it looks like Polynomial evaluation: Given a vector of coefficients C and a value x, the value of c 0 + c 1 x +.. Is +/C * X ^ i. $ C

Basic components Fundamental data-structure is n-dimensional array Components are scalar Atomic operations on scalars extend pointwise to n- dimensional structures: built-in iterators obviate the needs for conventional control structures A single numeric type: integers are floating point numbers with no fractional part Booleans are arithmetic values: arrays can serve as boolean masks

Using the syntactic space a ^ b : exponentiation ^ b : e b ! a : factorial a ! b : binomial coefficient a % b : division % b : inverse ? a : random number between 0 and a b ? a : vector of size b, of random numbers

Shape Arrays characterized by their dimensions: v =: NB. input $ v 5 $$ v 1 $ v is the vector of dimensions $$ v is the number of dimensions $ 5 (nothing: 5 is a scalar) $$ 5 0 (A scalar has zero dimensions)

Creating multidimensional arrays Dyadic use of $ : reshape Generator: i. Generates integers from zero i $ i i. 4 NB. 3-d matrix. Displayed in 2-d slices

Indexing (from) Dyadic { : x { v selects component of v at position x mod $v 2 0 _1 _3 { “abcdefg” cage Result has the shape of the left operand Negative indices wrap around (index from the right)

Adverbs An adverb modifies a verb: / distributes a binary operator over a composite argument v = / v 15 * / v 120 >. / v 5

Scalar product The adverb insert and pointwise extension of operators yield the usual operation of linear algebra: +/ a * b ≡ a 0.b 0 + a 1.b 1 + … This generalizes to any dyadic operation: op 1 / a op b ≡ (a 0 op b 0 ) op 1 (a 1 op b 1 ) …

Outer product Dyadic meaning of adverb insert: a = a */ a Generalization: if $$a = 1 and $$b = 1 then a op / b Is an object R such that $R = $a, $b and the (i, j) component of R is computed as (i {a) op ( j { b)