CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University.

Slides:



Advertisements
Similar presentations
Problems and solutions Session 3. Introduction to MATLAB - Solutions 3 Problems 1. Write function Xn = mspolygon(X,x0,a) that scales the INPUT polygon.
Advertisements

A MATLAB function is a special type of M-file that runs in its own independent workspace. It receives input data through an input argument list, and returns.
MATLAB Functions – Part II Greg Reese, Ph.D Research Computing Support Group Academic Technology Services Miami University September 2013.
CS231A Matlab Tutorial Philip Lee Winter Overview  Goals › Introduction to Matlab › Matlab Snippets › Basic image manipulations › Helpful Matlab.
Yuval Hart, Weizmann 2010 © 1 Introduction to Matlab & Data Analysis Tutorial 2 and 3: Variables and Matrix Manipulation.
EGR 106 – Week 2 – Arrays & Scripts Brief review of last week Arrays: – Concept – Construction – Addressing Scripts and the editor Audio arrays Textbook.
Eilon Sharon, Weizmann 2008 © 1 Introduction to Matlab & Data Analysis Tutorial 2: Variables and Matrix Manipulation.
Division Example 2x - 3y + 4z = 10 x + 6y - 3z = 4 -5x + y + 2z = 3 A*X = B where A = B = >> X = A\B X =
EGR 106 – Week 8 Data Files & Functions Interacting with Data Files Functions – Concept – Examples and applications Textbook chapter ,
Introduction to MATLAB
Introduction to C++ Penn State University
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA CSC141 Computer Science I.
Matlab tutorial course Lesson 2: Arrays and data types
CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 11 - JavaScript: Arrays Outline 11.1 Introduction 11.2 Arrays 11.3 Declaring and Allocating Arrays.
CSC 545: Database Systems Dr. Zhen Jiang Computer Science Department West Chester University.
JAVA: An Introduction to Problem Solving & Programming, 7 th Ed. By Walter Savitch ISBN © 2015 Pearson Education, Inc., Upper Saddle River,
Computer Programming in BIO Lab Zhen Jiang Computer Science Department West Chester University West Chester, PA 19383
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
CSC321: Database Management Systems Dr. Zhen Jiang Computer Science Department West Chester University West Chester, PA
MATLAB FUNDAMENTALS: MATRIX/ARRAY FUNCTIONS THE COLON MATRIX/ARRAY MANIPULATION INPUT/OUTPUT HP 100 – MATLAB Wednesday, 9/3/2014
Introduction to MATLAB Session 3 Simopekka Vänskä, THL Department of Mathematics and Statistics University of Helsinki 2011.
CSC141 Computer Science I Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2009 Pearson Education, Inc., Upper.
Matlab Programming for Engineers Dr. Bashir NOURI Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
CARDIAC ELECTROPHYSIOLOGY WEB LAB Developing your own protocol descriptions.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
CMPS 1371 Introduction to Computing for Engineers FILE Input / Output.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Introduction to MATLAB Session 1 Simopekka Vänskä, THL 2010.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
CSC 142 Computer Science II Zhen Jiang West Chester University
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
CSC115 Introduction to Computer Programming Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA 19383
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
1 Lecture 1 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University.
Chapter 14 Formatting Readable Output. Chapter Objectives  Add a column heading with a line break to a report  Format the appearance of numeric data.
MATLAB for Engineers, by Holly Moore. ISBN © 2007 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is.
CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University.
Structuring Experimenting Esmée Bertens Tim de Ridder Herman de Vos /Department of Mechanical Engineering Systems Engineering Group Masters Team Project.
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python, Class 2 Karsten Hokamp, PhD Genetics TCD, 17/11/2015.
MATLAB Lecture 1 염익준. Introduction MATLAB (MATrix LABoratory) a special purpose computer program optimized to perform engineering and scientific calculations.
CSE 455 : Computer Vision MATLAB 101 Getting Started with MATLAB.
Zhen Jiang Dept. of Computer Science West Chester University West Chester, PA CSC141 Computer Science I.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
How To Create a Function in MATLAB English 393 Professor Harris May 10, 2011 Ava-Dawn Hammond Byung Kang Imelda Kwakye-Ackah Evelyn Ojo Adam Page.
Physics 114: Lecture 1 Overview of Class Intro to MATLAB
CSC321: Database Management Systems
Topics discussed in this section:
Dr. Zhen Jiang Computer Science Department West Chester University
Dr. Zhen Jiang Computer Science Department West Chester University
CSC115 Introduction to Computer Programming
CSC141 Computer Science I Zhen Jiang Dept. of Computer Science
CSC115 Introduction to Computer Programming
CST221: Database Systems (III)
CSC115 Introduction to Computer Programming
CSC115 Introduction to Computer Programming
CSC141 Computer Science I Zhen Jiang Dept. of Computer Science
CSC530 Data Structure - Decision
Dr. Zhen Jiang Computer Science Department West Chester University
Dr. Zhen Jiang Computer Science Department West Chester University
Dr. Zhen Jiang Computer Science Department West Chester University
Introduction To MATLAB
Topics discussed in this section:
Dr. Zhen Jiang Computer Science Department West Chester University
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Presentation transcript:

CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University

Class information Textbook ◦ Hanselman & Littlefield, “Mastering Matlab 7”, Prentice Hall, Upper Saddle River, NJ, 2005.

Example on Page 6 ◦ Variable ◦ Keyword (reserved word) ◦ ; ◦ Calculation ◦ % (comment) ◦, ◦ error

Or the direct access from the icon “blank”

Input / Output Parameter input Page 33

Xls input (the easiest one) ◦ Sample xls input file Sample xls input file Page 250 Also available at sk/help/techdoc/ref/xlsread.html sk/help/techdoc/ref/xlsread.html

Something must know Page 39 ◦ How to use the readout n?

Apply an operation on every unit in the array Page 47 ` (especially useful to handle different input format, see the discussion later)

Standard arrays, page 54 ◦ Ones, zeros, size, eye, rand, randn, diag ◦ Repmat(pi, 3, 4)

Array sorting, search, page 73

Find(a>4, 2, ‘first’) ◦ Page 189, such as a filter to discard NaN or InF Max Min Size

Manipulation *, page 82 (optional)

Multidimensional array ◦ 1-d => 2-d => 3-d, page 98 ◦ 3-d => 2-d => 1-d, page 99 ◦ Reshape(page 57), cat(page 101), flipdim, shiftdim, permute ◦ Their search and sorting, such as a 3d array sorted in one dimension.

[p, q] ◦ [ p q ] ◦ Or cat (2, p, q) [p; q] ◦ Or cat (1, p, q)

Output ◦ Standard output ◦ Disp(), page 162 ◦ Sprintf, page 168 ◦ Plot, page 276

Other inputs ◦ Sample plain text file Sample plain text file Help fileformats, page 253 Tip: Try to avoid using low level file I/O