Matlab Fundamentals: working with data.

Slides:



Advertisements
Similar presentations
MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
Advertisements

DAY 10: MICROSOFT EXCEL – CHAPTER 8 MICROSOFT EXCEL – CHAPTER 9 MICROSOFT EXCEL – CHAPTER 10 Akhila Kondai September 23, 2013.
Introduction to Matlab
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
MATLAB – What is it? Computing environment / programming language Tool for manipulating matrices Many applications, you just need to get some numbers in.
Engineering Computation using MATLAB
Where to Go Next. Outline Announcements: –Homework IV due Wed. 10/8 by 5, by Extra week for projects Absolutely no exceptions! Answers will be.
Soft Computing 1 Matlab Tutorial Kai Goebel, Bill Cheetham RPI/GE CRD
CIS 404: Survey and Use of Software Libraries for Scientific Computing Andrew Pershing 3134 Snee Hall
This is…. –Contains syllabus, lecture notes, examples, homework Office Hours –Tuesday & Wednesday, 3-4.
SPSS 1: An Introduction to the Statistical Package SPSS Suzie Cro MRC Clinical Trials Unit.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 21P. 1Winter Quarter MATLAB: Structures.
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
Matlab tutorial course Lesson 2: Arrays and data types
Introduction to MATLAB Session 1 Prepared By: Dina El Kholy Ahmed Dalal Statistics Course – Biomedical Department -year 3.
4.2 Review & Calculator Practice Algebra 2.  Class Announcements  PLAN Practice  Homework Questions/Check  4.2 Quick Notes & Calculator Practice 
Text Processing. Outline Announcements: –Homework I: due Today. by 5, by Discuss on Friday. –Homework II: on web HW I: question 7 Finish functions.
1 Lab of COMP 406 Teaching Assistant: Pei-Yuan Zhou Contact: Lab 1: 12 Sep., 2014 Introduction of Matlab (I)
Math 15 Lecture 10 University of California, Merced Scilab Programming – No. 1.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Matlab Programming for Engineers Dr. Bashir NOURI Introduction to Matlab Matlab Basics Branching Statements Loops User Defined Functions Additional Data.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
CMPS 1371 Introduction to Computing for Engineers FILE Input / Output.
Language Basics and Data Types ● What and why of Matlab. ● Matlab desktop. ● Familiarize ourselves with basics of language. ● Basic types of data that.
This is…. –Contains syllabus, lecture notes, examples, homework Office Hours –Monday & Tuesday, 11-1 in.
A string is an array of characters Strings have many uses in MATLAB Display text output Specify formatting for plots Input arguments for some functions.
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
Array Operations ENGR 1181 MATLAB 4.
Matlab Fundamentals: working with data.
The Hong Kong Polytechnic University Industrial Centre MatLAB Lesson 1 : Overview & Environment Edward Cheung Room W311g.
Input Output Garbage In, Garbage Out. Outline Announcements: –Homework III: due Today. by 5, by Discuss on Friday. –Homework IV: on web, due following.
CSE 455 : Computer Vision MATLAB 101 Getting Started with MATLAB.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Improving performance Matlab’s a pig. Outline Announcements: –Homework I: Solutions on web –Homework II: on web--due Wed. Homework I Performance Issues.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
Finishing up Chapter 5. Will this code enter the if statement? G=[30,55,10] if G
“Moh’d Sami” AshhabSummer 2008University of Jordan MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008.
Lecture 12: M/O/F/ for Engineering Applications B Burlingame 27 April 2016.
An Introduction to Programming in Matlab Emily Blumenthal
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
Input Output Garbage In, Garbage Out. Outline Announcements: –Homework III: due Wednesday Advanced ASCII Binary Basics Filesystem Fun.
Physics 114: Lecture 1 Overview of Class Intro to MATLAB
Getting started with Matlab: Outline
Introduction to Matlab
Linear Algebra review (optional)
L – Modeling and Simulating Social Systems with MATLAB
Lecture: MATLAB Chapter 1 Introduction
MATLAB Basics Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
Other Kinds of Arrays Chapter 11
Other Kinds of Arrays Chapter 11
Functions (subprograms)
(Mohammed Sami) Ashhab
Matlab Workshop 9/22/2018.
StatLab Matlab Workshop
Matlab review Matlab is a numerical analysis system
MATLAB Tutorial Dr. David W. Graham.
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Matlab tutorial course
Lecture 2 Introduction to MATLAB
MATLAB – What Is It ? Name is from matrix laboratory Powerful tool for
Digital Image Processing
Matlab Fundamentals: working with data.
funCTIONs and Data Import/Export
Matrices and Data Holt Algebra 2.
Signals.
Linear Algebra review (optional)
Programming The ideal style of programming is Structured or
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Presentation transcript:

Matlab Fundamentals: working with data

Outline Announcements Matrix Multiplication ND-arrays Homework I due 9/11, 5PM by e-mail remember--plain text, Subject=CIS 401 Homework Moved to Thurston 403 (bigger & cooler) Matrix Multiplication ND-arrays Loading, saving, and plotting data

Matlab History Matlab stands for “Matrix Laboratory” Developed by from LAPACK--a series of routines for numerical linear algebra Consequences * is funny, / is even funnier Matlab does linear algebra really well Default type is double array

Matrix Multiplication C=A*B A is m-by-p and B is p-by-n then C is m-by-n: C(i,j)= a(i,1)*b(1,j)+a(i,2)*b(2,j)+ … + a(i,p)*b(p,j) p

Matrix Multiplication Another view: C(i,j)=a(i,:)*b(:,j); 1-by-p p-by-1 answer is 1-by-1 This is a vector (dot) product

Matrix Multiplication Special Cases of A*B Name size(A) size(B) size(C) dot product u’*v 1-by-n (row) n-by-1 (column) linear system b=A*x m-by-n (matrix) outer product X=ones(5,1)*(1:3) Y=(1:5)’*ones(1,3)

Matrix Multiplication We’ll defer matrix division for a while matrix multiplication can be useful--even to those who hate LA outer products are very handy Vectorized ops much faster than writing loops

ND arrays Until V5, Matlab arrays could only be 2D Now has unlimited dimensions: A=ones(2,3,2) A is a 3D array of ones, with 2 rows, 3 columns, and 2 layers A(:,:,1) is a 2-by-3 matrix

Working with Data Data is central to applied scientific computing Data Program Output Currents SSH Geostropic eq. U,V,plot Weather T,V,M Finite diff. T,V,M in future Bioinfomatics ATCGCGTA… Search for genes Location of genes Electronics Signal FFT Plot of spectrum

Getting Data into Matlab Options Cut & paste, or enter by hand Read from a file

File Types File Type Efficiency (info/byte) Matlab Factor Intangibles ASCII Low Good Easy to edit and view, universal. Binary High Not so good Can’t view, need to know how it was created Proprietary (e.g. Excel) ?? Impossible-to-good Some formats supported, some not .mat Best Careful when loading to avoid variable-name collisions

Loading Simple Text Files “load fname.txt” will create an array fname with the data Each line of fname.txt must have same number of columns Matlab will ignore lines starting with % add to header lines, so Matlab will ignore

Omahacorn.txt Table of values in Excel Make the file suitable for Matlab (e.g. a matrix) save as text Load into Matlab Rearrange the data with Matlab array operations Save data to a .mat file Create a plot of corn prices vs. time

Summary Matrix mult: “Inner matrix dimensions must agree” Load ASCII or .mat files with load Save data to ASCII or .mat with save Create simple plots with plot Get help with help

Other help options helpwin--help info categorized and available through GUI Launch Pad or through Help menu More tutorial-like