Final Exam Review Part 2 - MATLAB

Slides:



Advertisements
Similar presentations
259 Lecture 17 Working with Data in MATLAB. Overview  In this lecture, we’ll look at some commands that are useful for working with data!  fzero  sum,
Advertisements

1 Chapter 13 Curve Fitting and Correlation This chapter will be concerned primarily with two separate but closely interrelated processes: (1) the fitting.
Plotting Selim Aksoy Bilkent University Department of Computer Engineering
1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 10.
CITS2401 Computer Analysis & Visualisation
Scripts and Flow Control. Scripts So far we have been entering commands directly into the command line But there is a better way Script files (and functions)
Exam #3 Review: Comprehensive Exam Class 14.2 Palm Matlab Book Ch. 1-5.
General Computer Science for Engineers CISC 106 Lecture 05 Dr. John Cavazos Computer and Information Sciences 2/20/2009.
Matlab intro The Environment
1 MATLAB 基礎. 2 MATLAB  Workspace: environment (address space) where all variables reside  After carrying out a calculation, MATLAB assigns the result.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
For loop Khairul anwar.
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,
Engr 0012 (04-1) LecNotes working toward a script that will help analyze data “Big” steps in accomplishing goal 1. Load data from file (have already.
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
Introduction to MATLAB. Windows in MATLAB Command Window – where you enter data, run MATLAB code, and display results Command History - displays a log.
ELG 3120 Signal and System Analysis 1 Introduction to MATLAB TAs Wei Zhang Ozgur Ekici (Section A)(Section B) ELG 3120 Lab Tutorial 1.
ENGR 1320 Final Review - Programming Major Topics: – Functions and Scripts – Vector and Matrix Operations in Matlab Dot product Cross product – Plotting.
MATLAB Tutorial EE 327 Signals and Systems 1. What is MATLAB? MATLAB – Matrix Laboratory The premier number-crunching software Extremely useful for signal.
Review for Exam2 Key Ideas 1. Key Ideas: Boolean Operators (2 > 3) || (3 < 29.3) A.True B.False C.Impossible to determine (22 > 3) && (3 > 29.3) A.True.
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.
Lecture 10 2D plotting & curve fitting Subplots Other 2-D Plots Other 2-D Plots Curve fitting © 2007 Daniel Valentine. All rights reserved. Published by.
What does C store? >>A = [1 2 3] >>B = [1 1] >>[C,D]=meshgrid(A,B) c) a) d) b)
ME6104: CAD. Module 4. ME6104: CAD. Module 4. Systems Realization Laboratory Module 4 Matlab ME 6104 – Fundamentals of Computer-Aided Design.
Lecture 26: Reusable Methods: Enviable Sloth. Creating Function M-files User defined functions are stored as M- files To use them, they must be in the.
Polynomials UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative Commons.
1. Overview 2. plot in 2D 3. Plot in 3D 4. Other possible charts 5. Engineers: label your plots! 6. Plots & Polynomial Plotting 11.
Polynomials, Curve Fitting and Interpolation. In this chapter will study Polynomials – functions of a special form that arise often in science and engineering.
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
General Computer Science for Engineers CISC 106 Lecture 13 - Midterm Review James Atlas Computer and Information Sciences 10/02/2009.
BRIAN D. HAHN AND DANIEL T. VALENTINE THIRD EDITION Essential MATLAB® for Engineers and Scientists.
Unit 3 Section : Regression Lines on the TI  Step 1: Enter the scatter plot data into L1 and L2  Step 2 : Plot your scatter plot  Remember.
Interduction to MATLAB (part 2) Manal Alotaibi Mathematics department College of science King saud university.
CS100A, Fall 1998, Lecture 201 CS100A, Fall 1998 Lecture 20, Tuesday Nov 10 More Matlab Concepts: plotting (cont.) 2-D arrays Control structures: while,
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
전자장 1 실험 - Matlab 사용법 - Photonic Systems Laboratory School of EE, Seoul National University Photonic Systems Lab School of EECS, S.N.U.
Outline What is MATLAB MATLAB desktop Variables, Vectors and Matrices Matrix operations Array operations Built-in functions: Scalar, Vector, Matrix Data.
How to use MATLAB (using M-files) Double click this icon To start Matlab 6.5.
Lecture 29: Modeling Data. Data Modeling Interpolate between data points, using either linear or cubic spline models Model a set of data points as a polynomial.
Tutorial on Matlab Basics
ECE 1304 Introduction to Electrical and Computer Engineering
Release Numbers MATLAB is updated regularly
Unit 2 Day 3: Graphing Using Slope-Intercept Form
Examples, examples: Outline
Introduction to Matlab
Two-Dimensional Plots
Scripts & Functions Scripts and functions are contained in .m-files
MATLAB DENC 2533 ECADD LAB 9.
Final Exam Review Part 4 - VBA
Lecture 10 2D plotting & curve fitting
MATLAB How to use (using M-files) Double click this icon
Matlab review Matlab is a numerical analysis system
MATLAB (Lecture 2) BY:MAHA ALMOUSA.
MATH 493 Introduction to MATLAB
MATLAB Tutorial Dr. David W. Graham.
MATLAB How to use (using M-files) Double click this icon
MATLAB How to use (using M-files)
Introduction to MATLAB
CS 175 Project in AI Discussion -- matlab
Plotting Signals in MATLAB
REDUCING MATRICES.
Using Slope Intercept Form to Graph Day 2
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Announcements P3 due today
How to Use MATLAB A Brief Introduction.
Using Slope Intercept Form to Graph Day 2
MATLAB (Lecture 2) BY:MAHA ALMOUSA.
Redundant code repositories
Presentation transcript:

Final Exam Review Part 2 - MATLAB ChE 160 SI – Becca Fall 2016

What are you concerned about? MATLAB What do you remember? What are you concerned about?

Basics What do these commands or notations do? clc clear % ; \n

Basics- Answers clc - clears command window clear - clears workspace % - makes a comment ; - suppresses values from showing in command window \n – return to the next line (like hitting enter)

Vectors Fill in where the starting and ending values go and step size/number of places in the vector. Spring_vector = _______:_______:_______ ; Spring_vector2 = linspace(_______,________,________);

Vectors- Answers Spring_vector = starting value : step size : end value ; Spring_vector2 = linspace(start, end, number points)

Assorted How do you transpose/flip a vector or matrix? What does the function input( ) do? How do you use fprintf( )?

Assorted- Answers Single apostrophe transposes column_vector = row_vector’ ; input( ) allows the user to put in a value from the command window Candy_Hearts = input(‘How many candy hearts do you eat each Valentine’s Day?’) ; fprintf( ) displays text and numbers into the command window from script fprintf(‘You eat %g candy hearts each Valentine’s Day. \n’, Candy_Hearts)

Graphing How do you plot 2 sets arrays of data? What is the difference between plot(), semilogy(), and loglog() How do you use ‘MarkerFaceColor’? What is the letter for a line, circle, and triangle? What is the letter for black, magenta, blue, green, and red?

Graphing- Answers How do you plot 2 sets arrays of data? plot(a,b) What is the difference between plot(), semilogy(), and loglog() Rectangular, semilog with y log scale, log-log plot How do you use ‘MarkerFaceColor’? Change color of the marker face in a plot to fill What is the letter for a line, circle, and triangle? ‘-’ ‘o’ ‘^’ What is the letter for black, magenta, blue, green, and red? ‘k’ ‘m’ ‘b’ ‘g’ ‘r’

Polyfit/Polyval Why do you use polyfit and polyval? What does polyfit find? What does polyval find? Fill in the blanks: __ = polyfit(_____,______,_____); __ = polyval(______,______);

Polyfit/Polyval- Answers Why do you use polyfit and polyval? Fitted line for the data, linear regression for Matlab What does polyfit find? Polynomial coefficients, m slope and b intercept What does polyval find? Fitted dependent values Fill in the blanks: P = polyfit(x,y,[degree of polynomial]); yfit= polyval(P,xfit);

What is the basic structure of… Loops What is the basic structure of… For loop If Loop While Loop

for (counting statement) calculations and statements end For Loops- Answers for (counting statement) calculations and statements end

If Loops- Answers if (conditional statement) calculation/statement elseif (conditional statement) else final option end

While Loops- Answers %Initialize value while (conditional statement) calculations end

Loops What is the difference between the structure of a for and while loop? How can you use nested for loops to create matrix?

Loops- Answers What is the difference between the structure of a for and while loop? For iterates a certain number of times, while does it until a condition is met, unknown number of iterations How can you use nested for loops to create matrix? Matricx(r,c) = 3*r-c;

Matrices [A][x] = [b] [x] = [A]\[b]

Functions Function [Outputvariable] = FunctionName(inputvariable) Calculations Outputvariable = calculation

How did that go?