Introduction Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

Guy Griffiths. General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party.
Chapter 4 Ch 1 – Introduction to Computers and Java Flow of Control Loops 1.
Unit 6 Assignment 2 Chris Boardley.
Visualization Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Control Flow Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Coding. Steps to Success 1.Create a PLAN including a detailed statement of requirements (SORs) 2.Write algorithms based on the SORs 3.Write pseudocode.
More Flow Control Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
1 Program Design Language (PDL) Slides by: Noppadon Kamolvilassatian Source: Code Complete by Steve McConnell, Chapter 4.
Copyleft and cathedrals How the counterculture is changing the way we do business.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data Analytics and Dynamic Languages Lee E. Edlefsen, Ph.D. VP of Engineering 1.
Reasons to study concepts of PL
Programming Languages Structure
Parallelizing Compilers Presented by Yiwei Zhang.
Chapter 1 Principles of Programming and Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
Programming Concepts and Languages Chapter 12 – Computers: Understanding Technology, 3 rd edition 1November
EXPLAIN IT WHY YOUR RESEARCH DESERVES GOOD DOCUMENTATION AND METADATA.
Mechanics Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Chapter 2 The process Process, Methods, and Tools
Planning for the Solution
EENG 1920 Chapter 1 The Engineering Design Process 1.
1 © 2014 The MathWorks, Inc. HPC with MATLAB Making parallel programming simple Jos Martin, Principal Architect, Parallel Computing Tools
Gary MarsdenSlide 1University of Cape Town Principles of programming language design Gary Marsden Semester 2 – 2001.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Basic File Input and Output Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
Prototyping. What is a prototype? In other design fields a prototype is a small- scale model: a miniature car a miniature building or town.
Finding Red Pixels Prof. Ramin Zabih
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
More Tools Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Linear Algebra Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Interface and Implementation Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Study Guide – Week #6 – Ethics & Software Development Start the Game.
Introduction Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Introduction Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Linear Algebra Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Introduction Copyright © Software Carpentry This work is licensed under the Creative Commons Attribution License See
Basic Flow Control Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Basics Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
8.4 Use Scientific Notation Algebra. Scientific Notation Numbers such as 1,000,000, 153,000 and are written in standard form. Another way to write.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
Basics Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Chapter 2 Principles of Programming and Software Engineering.
Indexing Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
CSC141 Introduction to Computer Programming Programming Language.
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Part of the Mathematics glossary: An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem. The word derives from the name.
Code Optimization.
CSC391/691 Intro to OpenCV Dr. Rongzhong Li Fall 2016
Introduction to Programming in MATLAB
7 Big Ideas of Computing:
Chapter 1 Reasons to study concepts of PLs Programming Domains
Program Design Invasion Percolation: Neighbors
Programming Concepts and Languages
Roadmap to Programming work, right, fast KISS
Cohesion and Coupling Chapter 5, Pfleeger 01/01/10.
Lesson 2 Programming constructs – Algorithms – Scratch – Variables Intro.
How an RSE can benefit your projects:
MATLAB Programming Indexing Copyright © Software Carpentry 2011
Version Control Introduction Copyright © Software Carpentry 2010
Program Design Language (PDL)
Extending Interface Based Design
©. © © © All rights reserved © All rights reserved (and then some)
Presentation transcript:

Introduction Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See for more information. MATLAB Programming

MATLABIntroduction Good scientific software: For whom is software written?

MATLABIntroduction Good scientific software: For whom is software written?

MATLABIntroduction Good scientific software: For whom is software written? 1) Human readable

MATLABIntroduction Good scientific software: For whom is software written? 1) Human readable 2) Emphasizes domain and problem specific computation.

MATLABIntroduction Good scientific software: For whom is software written? 1) Human readable 2) Emphasizes domain and problem specific computation. 3) Testable

MATLABIntroduction Good scientific software: For whom is software written? 1) Human readable 2) Emphasizes domain and problem specific computation. 3) Testable … and then … 4) Efficient

MATLABIntroduction Bad scientific software: 1) Emphasizes efficiency over readability 2) Emphasizes efficiency over testability 3) Reinvents the wheel 4) Couples domain specific knowledge with underlying mathematical routines. Fast, wrong code gets you the wrong answer… faster.

MATLABIntroduction MATLAB is a … … programming language… … and a programming environment. Encourages Reuse of tested, efficient mathematical routines High level representation of programs Mathematical expression over details of algorithms.

MATLABIntroduction MATLAB the environment

MATLABIntroduction MATLAB the environment

MATLABIntroduction MATLAB the environment

MATLABIntroduction MATLAB the environment

MATLABIntroduction MATLAB as a programming language: Arrays >> nums = [1,2,3] >> nums = nums + 4; For loops >> for i = nums: >> isprime(i);

MATLABIntroduction Key idea: Data parallel programming The programmer works at level of mathematical ideas… … not loops and indices. Most operators work on arrays directly. Common theme: you probably* don’t want to use a loop * (exceptions apply)

MATLABIntroduction Example: >> for i = 1:length(arr) >> arr(i) = arr(i) * 100; >> end Or… >> arr = arr * 100;

MATLABIntroduction Why learn MATLAB? Rapid prototyping Scales well to large, production problems. Thousands of mathematical routines Tested Efficient Common language in many fields

February 2011 created by Richard T. Guy Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See for more information.