EE 4780 Matlab tutorial.

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

Introduction to Matlab
EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet.
MATLAB – What is it? Computing environment / programming language Tool for manipulating matrices Many applications, you just need to get some numbers in.
Header, Specification, Body Input Parameter List Output Parameter List
MATLAB - Basics Centro de Informática Universidade Federal de Pernambuco Aprendizagem de Máquina – IN1102 Arley Ristar –
EE 4780 Bilateral Filter. Bahadir K. Gunturk2 Bilateral Filter Intensity (range) proximity Spatial (domain) proximity N is a fixed value used to define.
Image Processing Ch3: Intensity Transformation and spatial filters
Computer Science in Practice This course is an introduction to problems (and solutions) that arise in applied fields of computer science such as machine.
Introduction to MATLAB ES 156 Signals and Systems 2008 Harvard SEAS.
Introduction to Matlab Οικονομίδης Δημήτρης
Introduction to Raster Graphics Resize an image until it is pixelated.
Matlab intro The Environment
Matlab tutorial course Lesson 2: Arrays and data types
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Matlab tutorial course Exercises 2:. Exercises Copy the script ‘face_points.m’ from my webpage into your ‘scripts’ folder Create a new folder in your.
Martin Ellison University of Warwick and CEPR Bank of England, December 2005 Introduction to MATLAB.
Descriptive Statistics I: By the end of this class you should be able to: Palm: Section 7.1, 7.2 Program cords and delays in your music programs plot a.
Matrix Computations ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Recap Script M-file Editor/Debugger Window Cell Mode Chapter 3 “Built in MATLAB Function” Using Built-in Functions Using the HELP Feature Window HELP.
MATLAB Practice 2 Introducing MATLAB Lecture Notes on Video Search & Mining, Spring 2012 Presented by Jun Hee Yoo Biointelligence Laboratory School of.
A Brief Introduction to MATLAB Digital Image Processing 2014 Fall NTU.
Matlab Screen  Command Window  type commands  Current Directory  View folders and m-files  Workspace  View program variables  Double click on a.
EE 4780 Edge Detection.
CS1109 L AB 3 July 3rd. R OAD M AP Homework submission Review How to use function and scripts While-end Finish last exercise Lab 2 Challenge questions.
Matrix Computations ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Introduction To Matlab Class 4 Instructors: Hristiyan (Chris) Kourtev and Xiaotao Su, PhD Double click the matlab icon When prompted click “Skip”
Introduction to Matlab
Problems and solutions Session 2. Introduction to MATLAB - Solutions 2 Problems Write your solutions to m-files 1. Check how matrix A = a) [2 0; b) [2.
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
September 15, 2005 Lecture 5 - By Paul Lin 1 CPET 190 Lecture 5 Problem Solving with MATLAB
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
Image Enhancement (Frequency Domain)
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
6.S093: Visual Recognition through Machine Learning Competition MATLAB tutorial.
Introduction to Matlab Engr. Mian Shahzad Iqbal LAB NO.2
PATTERN RECOGNITION LAB 2 TA : Nouf Al-Harbi::
การใช้งานโปรแกรม MATLAB ดร. อำนาจ ขาวเน. BASIC ELEMENTS OF MATLAB MATLAB Desktop MATLAB Editor Help System MATLAB (MATrix LABoratory)
Machine Learning Octave tutorial 데이터 마이닝 박 영 택.
Matlab Class 8 Xiaotao Su, Ph.D. Visual Psychophysicist & IT Group Leader Rutgers Center for Cognitive Science (RuCCS) and Chris Kourtev.
EE 4780: Introduction to Computer Vision Linear Systems.
Introduction to Matlab
Introduction to MATLAB
Signals in Matlab Matlab as a name stands for Matrix Laboratory.
Introduction to Matlab
Matlab Workshop 9/22/2018.
StatLab Matlab Workshop
  Figure 7.1 Track Layout with Input Sensors and Output Switches and Output Tracks.
Image Enhancement (Frequency Domain)
Review: Linear Systems
2D Discrete Cosine Transform
StatLab Workshop: Intro to Matlab for Data Analysis and Statistical Modeling 11/29/2018.
Matlab tutorial course
Introduction to MATLAB Programming
  Figure 8.1 Track Layout with Input Sensors and Output Switches and Output Tracks.
THE NORMAL DISTRIBUTION AND THE 68–95–99.7% RULE
‘If’ statements, relational operators, and logical operators
Important Information about Poster Resizing
Important Information about Poster Resizing
Step-by-Step Banner Creation Guide
Part of knowledge base of fuzzy logic expert system for exercise control of diabetics
CS100A Lecture 21 Previous Lecture This Lecture
Important Information about Poster Resizing
Important Information about Poster Resizing
Important Information about Poster Resizing
Important Information about Poster Resizing
Important Information about Poster Resizing
Important Information about Poster Resizing
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Presentation transcript:

EE 4780 Matlab tutorial

MATLAB Review your matrix-vector knowledge Matlab help files are helpful to learn it Exercise: f = [1 2; 3 4] g = [1; 1] g = [1 1] g’ z = f * g’ n=0:10 plot(sin(n)); plot(n,sin(n)); title(‘Sinusoid’); xlabel(‘n’); ylabel(‘Sin(n)’); n=0:0.1:10 plot(n,sin(n)); grid; figure; subplot(2,1,1); plot(n,sin(n)); subplot(2,1,2); plot(n,cos(n)); Bahadir K. Gunturk

MATLAB Some more built-ins a = zeros(3,2) b = ones(2,4) c = rand(3,3) %Uniform distribution help rand help randn %Normal distribution d1 = inv(c) d2 = inv(rand(3,3)) d3 = d1+d2 d4 = d1-d2 d5 = d1*d2 d6 = d1.*d3 e = d6(:) Bahadir K. Gunturk

MATLAB Image processing in Matlab x=imread(‘cameraman.tif’); figure; imshow(x); [h,w]=size(x); y=x(0:h/2,0:w/2); imwrite(y,’man.tif’); % To look for a keyword lookfor resize Bahadir K. Gunturk

MATLAB M-file Save the following as myresize1.m function [y]=myresize1(x) % This function downsamples an image by two [h,w]=size(x); for i=1:h/2, for j=1:w/2, y(i,j) = x(2*i,2*j); end Compare with myresize2.m function [y]=myresize2(x) for i=0:h/2-1, for j=0:w/2-1, y(i+1,j+1) = x(2*i+1,2*j+1); Compare with myresize3.m function [y]=myresize3(x) % This function downsamples an image by two y = x(1:2:end,1:2:end); We can add inputs/outputs function [y,height,width]=myresize4(x,factor) % Inputs: % x is the input image % factor is the downsampling factor % Outputs: % y is the output image % height and width are the size of the output image y = x(1:factor:end,1:factor:end); [height,width] = size(y); Bahadir K. Gunturk