Columbia COMS W4115 - Mx - Presentation (20 pages)

Previewing pages 1, 2, 19, 20 of 20 page document View the full content.
View Full Document

Mx - Presentation



Previewing pages 1, 2, 19, 20 of actual document.

View the full content.
View Full Document
View Full Document

Mx - Presentation

91 views

Other


Pages:
20
School:
Columbia University
Course:
Coms W4115 - Programming Languages and Translators
Programming Languages and Translators Documents

Unformatted text preview:

Mx A programming language for scientific computation Related Languages Matlab IDL Maple Mathcad Mathematica Goals Portability interpreted and executed by a java interpreter Efficiency greatly improves programming efficiency Program involving many matrix and vector operations are very short in Mx Ease of use very simple and quick to start What can the language do Basic matrix operations addition multiplication Advanced operations matrix slicing and masking Internal functions Print input load save plot paint Operations and Relations Arithmetic Operations Logical Operations not and or Relational Operations Array and Range Range Specifier i e A 1 10 1 2 i e A 1 2 Array Constructor 1 2 3 4 Statements Block Statement iteration for n 1 100 loop if exp stat if exp stat else stat break continue Assignments Conditional Statements Break and Continue Functions and Function call Self Defined Functions func id para list exp func id para list Function Call id para list Note can either be stand lone or right value depends on if it has returned value Internal functions Console output print print arguments to the standard output one by one Picture drawing paint draws a matrix in a new window as an image plot takes a matrix and plots it as a graph Color color sets the current color in RGB colormap take a matrix with rows as RGB and sets a colormap File I O functions load file type m n save matrix file type Matrix generator zeros m n random m n matrix operator inv matrix flip matrix Example 1 Mr Potato A load potato dat byte 128 128 colormap 1 paint A flip A mirror A flip mirror A A flip A mirror A flip mirror A return 0 Overview of the interpreter Currently the Mx programming language is implemented interpretively The interpreter parses and executes the user input or programs in files and generates printed output and or pictures The parser of the interpreter is written in Antlr and the rest routines are in Java For a small portion of our code we tried macro expansion in Java Adequate



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Mx - Presentation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Mx - Presentation and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?