Introduction to Matlab Module #8 Page 1 Introduction to Matlab Module #8 – Animation Topics 1.getframe 2.pause 3.Plotting a set of files Textbook Reading.

Slides:



Advertisements
Similar presentations
Unit 10 Miscellaneous Advanced Topics Introduction to C Programming.
Advertisements

Introduction to programming in java. Input and output to screen with Java program Structure of Java programs Statements Conditional statements.
Functions in MatLab Create a new folder on your Z:drive called MatLab_Class24 Start MatLab and change your current directory to MatLab_Class24 Topics:
Programming Environment S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn Introduction to Matlab: Cells and Structures.
Chapter 7. Even in quantitative sciences, we often encounter letters and/or words that must be processed by code You may want to write code that: Reads.
EGR 106 – Week 2 – Arrays Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
Lecture 3 Sept 3 Complete Chapter 3 Exercises quiz.
Matlab DIY Lesson 1: Reading Data. Purpose of this Seminar Basic Ability to handle Data Analysis and Presentation in Matlab Understand how data is organized.
Lecture 3 August 31 Chapter 3. Chapter 3 – numbers, string, booleans integer: MATLAB stores numeric data as double-precision floating point (double) by.
Division Example 2x - 3y + 4z = 10 x + 6y - 3z = 4 -5x + y + 2z = 3 A*X = B where A = B = >> X = A\B X =
CS1061 C Programming Lecture 15: More on Characters and Strings A. O’Riordan, 2004.
Lecture 24 Introduction to state variable modeling Overall idea Example Simulating system response using MATLAB Related educational modules: –Section 2.6.1,
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the basic concepts and uses of arrays ❏ To be able to define C.
1 Announcements l Take textbook to lab. »Be sure to read Chapter 13 before lab –MATLAB tutorial –Can skip Section 13.4 l Bring your transmitter and receiver.
MATLAB and SimulinkLecture 11 To days Outline  Introduction  MATLAB Desktop  Basic Features  Branching Statements  Loops  Script file / Commando.
1 Quiz Preparation l Quiz 4 sheet provided. l Fill in your Name, etc. l Date is 9/11/12 l Answer questions during lecture. Lab Day/TimeSection Number Mon.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
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.
Copyright © The McGraw-Hill Companies, Inc. Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 1 An Overview of MATLAB.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 12: Pointers continued, C strings.
Awk Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Synthesis ENGR 1181 MATLAB 11. Topics  No new material  Covers topics that will be on the Midterm 2 Exam MATLAB 01 – Program Design MATLAB 02 – Introduction.
1 REVIEW 1 EXAM 3. Question 1 Which statement(s) is/are valid to create a string? a. x = “EGR 115” □ Valid □ Invalid b. x = ‘EGR 115’ □ Valid □ Invali.
Introduction MATLAB stands for MATrix LABoratory.  Basics  Matrix Manipulations  MATLAB Programming  Graphics  Image types  Image Processing  Useful.
Part 1 Chapter 3 Programming with MATLAB PowerPoints organized by Dr. Michael R. Gustafson II, Duke University and Prof. Steve Chapra, Tufts University.
COP 3530 Data Structures & Algorithms Discussion Session 3.
Pseudocode Algorithms Using Sequence, Selection, and Repetition Simple Program Design Third Edition A Step-by-Step Approach 6.
Python Arrays. An array is a variable that stores a collection of things, like a list. For example a list of peoples names. We can access the different.
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
Introduction to Matlab Module #9 Page 1 Introduction to Matlab Module #9 – Simulink Topics 1.Simulink Textbook Reading Assignments Practice Problems.
5 1 Data Files CGI/Perl Programming By Diane Zak.
Chapters 2 & 3 MATLAB Skills This tutorial revisits Examples 3.1 to 3.4 to show how MATLAB can be used to solve the same problems 1.Scatter Plots 2.Other.
Murach’s C# 2010, C5 © 2010, Mike Murach & Associates, Inc.Slide 1.
Lecture 5 1.What is a variable 2.What types of information are stored in a variable 3.Getting user input from the keyboard 1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Chapter 16 Multimedia F Audio Files F Playing Audio F Running Audio on a Separate Thread F Displaying Images F Displaying a Sequence of Images  Using.
ENG College of Engineering Engineering Education Innovation Center 1 Basic For Loops in MATLAB Programming in MATLAB / Chapter 6 Topics Covered:
Introduction to Engineering MATLAB – 4 Arrays Agenda Creating arrays of numbers  Vectors: 1-D Arrays  Arrays: 2-D Arrays Array Addressing Strings & String.
訊號與系統 廖文淵 德霖技術學院資訊工程系 Introduction to MATLAB.
Chapter 1 Introduction to PHP Part 1. Textbook’s Code DOWNLOADS PHP and MySQL for Dynamic Web Sites Complete Set of Scripts.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
Introduction to Literate Programming in Matlab 2WN50 – Week programming-in-matlab.pptx?dl=0.
Chapter 4 MATLAB Programming MATLAB Troubleshooting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
Dept. of Animal Breeding and Genetics Programming basics & introduction to PERL Mats Pettersson.
Chapter 14: Multimedia Audio Files Audio Files Playing Audio Playing Audio Running Audio on a Separate Thread Running Audio on a Separate Thread Displaying.
Chapter 2. READING ASSIGNMENTS This Lecture: Chapter 2, pp Appendix A: Complex Numbers Appendix B: MATLAB or Labview Chapter 1: Introduction.
An Introduction to Programming in Matlab Emily Blumenthal
Beginning Programming for Engineers Animation. Special matrix functions >> clear >> ones(2,3) >> zeros(3,5) >> ones(2) >> zeros(3) >> eye(4) >> magic(4)
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
1 Section 5.4 Digital Sound Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Bryant Tober. Problem Description  View the sound wave produced from a wav file  Apply different modulations to the wave file  Hear the effect of the.
Copyright © The McGraw-Hill Companies, Inc. This work is only for non-profit use by instructors in courses for which this textbook has been adopted.
Introduction to PHP Part 1
ECE 1304 Introduction to Electrical and Computer Engineering
C Stuff CS 2308.
Topics Introduction to File Input and Output
Chapter 7 Files and Exceptions
Introduction to Matlab
Inserting Sounds.
Introduction to Matlab
7.3 Notes.
Topics Introduction to File Input and Output
MATLAB stands for MATrix LABoratory.
For Loops Pages
Topics Introduction to File Input and Output
Introduction To MATLAB
Presentation transcript:

Introduction to Matlab Module #8 Page 1 Introduction to Matlab Module #8 – Animation Topics 1.getframe 2.pause 3.Plotting a set of files Textbook Reading Assignments 1.Appendix B Practice Problems 1.Create an animation of a sine wave with the phase varying from 0 to 2 

Introduction to Matlab Module #8 Page 2 1) getframe Animation using ‘getframe’ - ‘getframe’ is a command which will store the current plot. - this can be used in a for loop to construct an array that contains a sequence of plots. - by varying the equation being plotted in the same for loop, getframe creates a movie clip - the movie is played using >> movie(M) where M is the variable which stores the plots as an array.

Introduction to Matlab Module #8 Page 3 2) pause Animation using ‘pause’ - ‘pause’ is a command which will delay Matlab for a specied amount of time >> pause(s) % where s is seconds (i.e., pause(0.05) - this command can be used to continually plot to the same figure with a delay between plots - this is typically used in a for loop

Introduction to Matlab Module #8 Page 4 3) Plotting a Set of Files Opening a set of files - Often it is necessary to open and plot a large set of files that contain the data you are after. - If the filenames have a numerical pattern (i.e, file01.mat, file02.mat, file03.mat), you can use a for loop and the command strcat - strcat will create a string by concatenate the arguments. The arguments can contain variables. - Variables can be converted to a type string using int2str