Tutorial 1: Matlab basics Erjia Yan.  Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions.

Slides:



Advertisements
Similar presentations
StatLab Workshop Yale University Maximiliano Appendino, Economics October 18 th, 2013.
Advertisements

Introduction to MATLAB The language of Technical Computing.
Matlab Programming Huajun Wang Department of Earth Sciences, Zhejiang University Jan 25,2012.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
MATLAB – What is it? Computing environment / programming language Tool for manipulating matrices Many applications, you just need to get some numbers in.
MATLAB MATLAB is a high-level technical computing language and
MATLAB Presented By: Nathalie Tacconi Presented By: Nathalie Tacconi Originally Prepared By: Sheridan Saint-Michel Originally Prepared By: Sheridan Saint-Michel.
MATLAB ME1107 Y Yan Reference: MATLAB for Engineers by Holly Moore (Pearson Prentice Hall)
1 Pendahuluan Pertemuan 5 Matakuliah: H0062/Teori Sistem Tahun: 2006.
Introduction to MATLAB Week 13 – 4/21/09. Instructor: Kate Musgrave Time: Tuesdays 3-5pm Office Hours: Tuesdays 1:30-3pm
Getting started with Matlab Numerical Methods Appendix B help/techdoc/learn_matlab/learn_matlab.html.
Introduction to MATLAB ES 156 Signals and Systems 2008 Harvard SEAS.
Introduction to MATLAB
© 2004 The MathWorks, Inc. 1 MATLAB for C/C++ Programmers Support your C/C++ development using MATLAB’s prebuilt graphics functions and trusted numerics.
MATLAB Lecture One Monday 4 July Matlab Melvyn Sim Department of Decision Sciences NUS Business School
Martin Ellison University of Warwick and CEPR Bank of England, December 2005 Introduction to MATLAB.
Nonparametric Econometrics1 Intro to Matlab for Data Analysis and Statistical Modeling.
Introduction to MATLAB
Data, graphics, and programming in R 28.1, 30.1, Daily:10:00-12:45 & 13:45-16:30 EXCEPT WED 4 th 9:00-11:45 & 12:45-15:30 Teacher: Anna Kuparinen.
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
IC3003 B ASIC S CIENTIFIC C OMPUTING Lecture 1 Monday 08:30-11:30 U204a.
Math 15 Lecture 7 University of California, Merced Scilab A “Very” Short Introduction.
1 Lab of COMP 406 Teaching Assistant: Pei-Yuan Zhou Contact: Lab 1: 12 Sep., 2014 Introduction of Matlab (I)
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Eng Ship Structures 1 Introduction to Matlab.
INTRODUCTION TO MATLAB LAB# 01
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Matlab Basics Tutorial. Vectors Let's start off by creating something simple, like a vector. Enter each element of the vector (separated by a space) between.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Basics of MATLAB By DR. Wafaa Shabana
MATLAB Environment ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
Language Basics and Data Types ● What and why of Matlab. ● Matlab desktop. ● Familiarize ourselves with basics of language. ● Basic types of data that.
Introduction to MATLAB Session 1 Simopekka Vänskä, THL 2010.
ME6104: CAD. Module 4. ME6104: CAD. Module 4. Systems Realization Laboratory Module 4 Matlab ME 6104 – Fundamentals of Computer-Aided Design.
What is Matlab Course Goals Precedence Accounts & Login Variables Error Types Course Logistics Vince Bertsch Office:
Lecture 1: Matlab Universe
1 Lecture 1 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
BOĞAZİÇİ UNIVERSITY DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS MATLAB AS A DATA MINING ENVIRONMENT.
Introduction to Matlab By Nazarudin,S.Si,M.Si,PhD.
Introduction to Matlab  Matlab is a software package for technical computation.  Matlab allows you to solve many numerical problems including - arrays.
Introduction to Matlab Electromagnetic Theory LAB by Engr. Mian Shahzad Iqbal.
Introduction to Matlab Patrice Koehl Department of Biological Sciences National University of Singapore
MATLAB Lecture 1 염익준. Introduction MATLAB (MATrix LABoratory) a special purpose computer program optimized to perform engineering and scientific calculations.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
MATLAB Constants, Variables & Expression Nafees Ahmed Asstt. Professor, EE Deptt DIT, DehraDun.
Matlab Tutorial Iman Moazzen First Session – September 11, 2013.
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
Matlab & Image processing toolbox Heejune Ahn SeoulTech Last updated Jan.
Pinellas County Schools
Computer Application in Engineering Design
Introduction to Matlab
Lecture: MATLAB Chapter 1 Introduction
MatLab Programming By Kishan Kathiriya.
2) Platform independent 3) Predefined functions
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
StatLab Matlab Workshop
Part I – Matlab Basics.
Use of Mathematics using Technology (Maltlab)
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Demo of Basic Matlab Features
Matlab Basic Dr. Imtiaz Hussain
Experiment No. (1) - an introduction to MATLAB
Introduction to Matlab
CS 111 Introduction to Computing in Engineering and Science
Introduction To MATLAB
Introduction to Matlab
Presentation transcript:

Tutorial 1: Matlab basics Erjia Yan

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources Some screenshots are taken from

 High-level language for numerical computation, visualization, and application development  Built-in mathematical functions for linear algebra, statistics, matrix manipulation, etc.  Extensive tool-boxes (e.g., accounting, bioinformatics, etc.)  Built-in graphics for visualizing data and tools for creating custom plots  Functions for integrating MATLAB based algorithms with external applications and languages such as C, Java,.NET, and Microsoft ® Excel ®

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 Desktop installation Per year Only available on university-owned computers Students can purchase directly from Mathworks.com

 East and west tower desktops  And most UITS desktops on campus, except for stand-alone informstations

  For large data processing; batch file-based  Need to register an account before using  Windows users can use WinSCP and Putty to upload/download files and send commands

Interface

Image interface large/matlab_audio_funky_plot_spectrogram_detail.jpg

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 Number: 4.34  Character: ‘variable_name’  Do not need to state variable types  a=4.34  cellname=‘networks’  Built-in variable (do not use them)  pi, Inf, -Inf, ans, NaN

 row=[1,2,3,4,5]  a 1*5 matrix  column=[1;2;3;4;5]  a 5*1 matrix  a=[1,2;3,4]  a 2*2 matrix You can give any variable names to row and column.

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 a=xlsread(filename)  a=xlsread(filename,sheet)  a=xlsread(filename,xlRange)  a=xlsread(filename,sheet,xlRange) For other import and export functions in Matlab, such as textual data, XML, etc., you can find relevant information here: import-and-export.html

 xlswrite(filename,A)  xlswrite(filename,A,sheet)  xlswrite(filename,A,xlRange)  xlswrite(filename,A,sheet,xlRange)

 a = csvread(filename,row,col)  csvwrite(filename,a,row,col) row and col are zero based, meaning that they start from 0 but not 1

 S = spconvert(D)  Sparse matrix format  row_id col_id value  First use load to upload the data into Matlab and then use spconvert to convert the data into a matrix  load datasample.txt  M = spconvert(datasample)

 You can use mmwrite(filename,M)  b/mmiomatlab.html b/mmiomatlab.html

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 Arithmetic operations (+,-,*,/)  4+5*7-2  Exponentiation (^)  2^3=8

 sqrt(2)  log(2), log10(0.23)  cos(1.2), atan(-.8)  exp(2+4*i)  round(1.4)=1, floor(3.9)=3, ceil(4.23)=5  plot(x,y)  And countless more…

 Transpose  transpose(M)  M’  Addition and subtraction  M-M’=  M+M’=

 For element-wise operations, use the dot:.(.*,./,.^)  M.*M’=  M./M’=  Matrix operations  M*M’=

 M(1,1)=1; M(1,2)=2  M(1,:)=[1 2]  M(1:2,2)=

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 Compiler   Object-Oriented Programming  oriented-programming.html oriented-programming.html

 Getting started  Install and use Matlab  Data format in Matlab  Export and import data in Matlab  Useful functions and commands  Programming in Matlab  Resources

 help command in Matlab…the most useful  Matlab Central   MIT Open Course  and-computer-science/6-094-introduction-to- matlab-january-iap-2010/lecture-notes/ and-computer-science/6-094-introduction-to- matlab-january-iap-2010/lecture-notes/  Google “matlab + keywords”