Getting Started with MATLAB (part 3) 1. Algebra, 2. Trig 3. The keyword ans 4. Clean up and suppress output: finalizing the software’s presentation 1.

Slides:



Advertisements
Similar presentations
Introduction to Applications & Basic Features. What is MATLAB®? MATLAB® /Simulink® is a powerful software tool for: Performing mathematical computations.
Advertisements

Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 13 Fall 2010.
MATLAB MATLAB is a high-level technical computing language and
Trig Graphs. y = sin x y = cos x y = tan x y = sin x + 2.
Evaluating Sine & Cosine and and Tangent (Section 7.4)
MATLAB ME1107 Y Yan Reference: MATLAB for Engineers by Holly Moore (Pearson Prentice Hall)
5.5 Solving Trigonometric Equations Example 1 A) Is a solution to ? B) Is a solution to cos x = sin 2x ?
1 Python Chapter 2 © Samuel Marateck, After you install the compiler, an icon labeled IDLE (Python GUI) will appear on the screen. If you click.
Introduction to MATLAB
Mathematical Applications For The Physics Classroom Algebra and Trigonometry.
Introduction to MATLAB ENGR 1187 MATLAB 1. Programming In The Real World Programming is a powerful tool for solving problems in every day industry settings.
CSC 107 – Programming For Science. Announcements  Lectures may not cover all material from book  Material that is most difficult or challenging is focus.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (2): MATLAB Environment (Chapter 1)
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
By: Kenzie Ashekian & Edgar Chant. What is a linear equation? A linear equation is an algebraic equation where the goal is to get the variable by itself,
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Trigonometry Review Game. Do not use a calculator on any of these questions until specified otherwise.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
ENG 1181 College of Engineering Engineering Education Innovation Center MATLAB is a powerful program for numerical computations, plotting and programming.
Introduction to MATLAB ENGR 1181 MATLAB 1. Programming In The Real World Programming is a powerful tool for solving problems in every day industry settings.
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
Slide deck by Dr. Greg Reese Miami University MATLAB An Introduction With Applications, 5 th Edition Dr. Amos Gilat The Ohio State University Chapter 1.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
Introduction to Engineering MATLAB – 2 Introduction to MATLAB - 2 Agenda Defining Variables MATLAB Windows.
CMPS 1371 Introduction to Computing for Engineers MatLab.
1 Math Expressions and Operators. 2 Some C++ Operators Precedence OperatorDescription Higher ( )Function call +Positive - Negative *Multiplication / Division.
Introduction to MATLAB ENGR 1181 MATLAB 1. Opening MATLAB  Students, please open MATLAB now.  CLICK on the shortcut icon → Alternatively, select… start/All.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Week 1: Variables, assignment, expressions READING: 1.2 – 1.4.
MA/CS 375 Fall 2002 Lecture 3. Example 2 A is a matrix with 3 rows and 2 columns.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
EGR 115 Introduction to Computing for Engineers Introduction to MATLAB Friday 29 August 2014 EGR 115 Introduction to Computing for Engineers.
Interduction to MATLAB Manal Alotaibi Mathematics department College of science King saud university.
ENG 1181 First-Year Engineering Program College of Engineering Engineering Education Innovation Center First-Year Engineering Program MAT - Introduction.
Basics of Matlab UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Trigonometry Exact Value Memory Quiz A Trigonometry Exact Value Memory Quiz A.
Topic Review for Exam 1 0.Infrastructure: You must be able to use MATLAB, Blackboard Exams, and Blackboard submissions 1. Computer Developing algorithms.
PHY 107 – Programming For Science. Announcements  Lectures may not cover all material from readings  Material that is most difficult or challenging.
MA/CS 375 Fall 2003 Lecture 3. .* Multiplication We can use the.* operator to perform multiplication entry by entry of two matrices:
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
Trigonometry Ratios.
Matlab Tutorial Iman Moazzen First Session – September 11, 2013.
BASICS OF MATLAB Engr.Mian Shahzad Iqbal Lecturer,Telecom Department University of Engineering & Technology Taxila.
Bell Ringer 5/12/10 Find the value of x. Round your answer to the nearest tenth.
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.
4.3 Right Triangle Trigonometry Objective: In this lesson you will learn how to evaluate trigonometric functions of acute angles and how to use the fundamental.
CSE 110: Programming Language I Afroza Sultana UB 1230.
P= Parentheses E= Exponents M= Multiplication D= Division A= Addition S= Subtraction.
Some Useful MATLAB Functions
Matlab Workshop Getting Started.
ECE 1304 Introduction to Electrical and Computer Engineering
Arithmetic Operations
MATLAB® An Introduction.
INTRODUCTION TO BASIC MATLAB
Seminar 1 for DCSP Using Matlab.
MATLAB DENC 2533 ECADD LAB 9.
Algebra Algebra.
Introduction to MATLAB
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Experiment No. (1) - an introduction to MATLAB
MATLAB Introduction MATLAB can be thought of as a powerful graphing calculator but with a lot more buttons! It is also a programming language, commands.
CS 111 Introduction to Computing in Engineering and Science
Introduction to MATLAB
-seminar 1 for digital signal processing
Introduction to MATLAB
Basics of Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
MatLab Program Used to Calculate Interactive
Electrical and Computer Engineering Department SUNY – New Paltz
Presentation transcript:

Getting Started with MATLAB (part 3) 1. Algebra, 2. Trig 3. The keyword ans 4. Clean up and suppress output: finalizing the software’s presentation 1

1. Algebra Precedence rules apply: *3 7/ *3 (2+3)*3 5^2 i^2

2. Trigonometry Why does sin(30) give a “wrong” answer? _________________________ 3

2. Trigonometry Common functions sin(), cos(), tan(), sind(), cosd(), tand(), asin(), acos(), atan(), asind(), acosd(), atand() exp(), sqrt(), log(), log10() abs(), round() 4

3. The keyword ans 5

6

Next question: What is ans ? ____________ 7

4. Polishing the final product clear typed inside the command window  Will delete all the variables in the Workspace this time. There is no going back. This cleans up every variable from memory. (No more little yellow boxes in the Workspace) clc typed inside the command window  Will completely erase the content of the command window. It does not affect the Workspace - the variables still exist and can be used. 8

“Suppressing” the output Hiding intermediate results, or even initial variables 9 No semi-colons…

“Suppressing” the output Second version, with semi-colons 10 Using a semicolon on these lines “suppresses the output”. In other words, it does not show the result of the command. But… did the commands do anything?

“Suppressing” the output Still second version (with semi-colons) 11 The variables ARE CREATED, and commands ARE executed!

“Suppressing” the output Since the result does not show up automatically in the command window, to **recall** (i.e. show again) the variable: type area in the command window 12

Wrapping Up Algebra reminders Order of Operations: Parentheses Exponent Multiplication and Division are the same precedence Addition and Subtraction are the same precedence Trigonometry MATLAB standard trig functions use radians by default e.g. sin() uses radians; sind() uses degrees Suppressing the output: Use a semi-colon at the end of calculations 13