Lecture 1: Matlab Universe Tom Rebold ENGR 52. Course Overview.

Slides:



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

Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Class 9.1 Chapter 4 Sections: 4.1, 4.2, 4.3
1 Lab Session-IV CSIT-120 Spring 2001 Lab 3 Revision and Exercises Rev: Precedence Rules Lab Exercise 4-A Machine Language Programming The “Micro” Machine.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Top-down Program Design Selim Aksoy Bilkent University Department of Computer Engineering
Introduction to a Programming Environment
Program Design, Relational and Logical Operators Selim Aksoy Bilkent University Department of Computer Engineering
Lecture 7. Review Homework 1 (sample solution) Project 1 will be assigned next week –Draw a picture (whatever you want) in the world by using turtles.
Gateway Quiz Reminders: The next Gateway will be given in class next week or the week after )check your course calendar.) Before then, each student who.
Math 010 online work that was due today at the start of class:
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
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.
Computer Science 101 Introduction to Programming.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
Chromium OS is an open-source project that aims to build an operating system that provides a fast, simple, and more secure computing experience for people.
2/4/2003CSCI 150: Introduction to Computer Science1 Introduction to Computer Science CSCI 150 Section 002 Session 6 Dr. Richard J. Bonneau IONA Technologies.
Fortran 1- Basics Chapters 1-2 in your Fortran book.
1 Chapter 1 MATLAB Primer This introductory chapter is relatively short and has as its main objective the introduction of MATLAB ® to the reader. This.
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
Main Memory Central Processor Unit Keyboard Input Device Secondary Memory Monitor Printer Output Devices.
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.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation tools. Others include Maple Mathematica MathCad.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
1 MatLab Basics Jae Hoon Kim Department of Physics Kangwon National University It contains hundreds of commands to do mathematics. Graph functions, solve.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
CMPS 1371 Introduction to Computing for Engineers MatLab.
1 INTRODUCTION TO PROBLEM SOLVING AND PROGRAMMING.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
1 C++ Programming Basics Chapter 1 Lecture CSIS 10A.
Lecture 1: Matlab Universe
Programming with Spread Sheets Lecture 18: Supporting Material Dr Kathryn Merrick Tuesday 19 th May, 2009.
Introduction to MATLAB 7 MATLAB Programming for Engineer Hassan Migdadi Spring 2013.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
1 Lecture 1 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Lecture 20: Choosing the Right Tool for the Job. What is MATLAB? MATLAB is one of a number of commercially available, sophisticated mathematical computation.
ENG 1181 First-Year Engineering Program College of Engineering Engineering Education Innovation Center First-Year Engineering Program MAT - Introduction.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2012.
Math 010 online work that was due today at the start of class: Section 1.3A Online Homework.
NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS ( NET 222: COMMUNICATIONS AND NETWORKS FUNDAMENTALS (PRACTICAL PART) Tutorial 2 : Matlab - Getting Started.
Gateway Quiz Reminders: The next Gateway will be given in class next week (check your course calendar.) Before then, each student who did not score 8/8.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
MATLAB (Matrix Algebra laboratory), distributed by The MathWorks, is a technical computing environment for high performance numeric computation and.
Physics 114: Lecture 1 Overview of Class Intro to MATLAB
Getting started with Matlab: Outline
ECE 1304 Introduction to Electrical and Computer Engineering
Introduction to Matlab
Release Numbers MATLAB is updated regularly
Lecture: MATLAB Chapter 1 Introduction
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
CS190/295 Programming in Python for Life Sciences: Lecture 1
Lecture 1: Introduction
Class 9.1 Chapter 4 Sections: 4.1, 4.2, 4.3
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Instructions to access MyStatLab for your PHYS 124 homework and Textbook Go to eClass and log into your eClass course for PHYS 124.
Experiment No. (1) - an introduction to MATLAB
Using Script Files and Managing Data
Computer Simulation Lab
Basics of Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Introduction to Matlab
Presentation transcript:

Lecture 1: Matlab Universe Tom Rebold ENGR 52

Course Overview

The Way the Class Works I lecture for 15 – 20 minutes You do lab for 30 – 40 minutes Labs link to extra Problems online for fast students Everyone turn in a solution to the last problem they solve today HOMEWORK: Bring in 3 Math problems to solve…medium, hard, impossible  We’ll have independent study time

To Buy Matlab Student Version, $100 Can purchase, download online  Link from ENGR196.3 class webpage Bookstore does not stock MATLAB retails for $1600, so it’s a pretty good deal BETTER DEAL: FreeMAT !!  Open source version, powerful, free, legal

Why MATLAB 10x faster compared to other choices:  C++, Fortran, Java  Excel, MathCad, Mathematica, Labview Matlab is a Very High Level Language  Designed for complex numerical calculations  Vast array of Toolboxes for different specialties  Excellent visualization tools  Symbolic math somewhat awkward  Simulink for modelling dynamic systems, 10x faster still

Today’s Agenda MATLAB Overview Working in MATLAB’s Environment Simple calculations, variables

MATLAB’s ENVIRONMENT

Download week1.zip Follow instructions in Lab1  View toolbox demos  Experiment with workspace configuration

Numeric Data At it’s most basic level, Matlab can be used as a simple calculator, by typing in an arithmetic expression and hitting enter. For example, at the command prompt, type: >> 8/10 >>4 * 3 >>8/10 + 4*3 >>9^2 (what does the ^ operator do? )

Arithmetic rules of precedence >> 8 + 3*5 >> 8 + (3*5) >> (8 + 3) * 5 >> 4^2 – 12 >> 8/4*2 >> 8/(4*2) >> 3*4^2 >> (3*4)^2 >>27^(1/3) >> 27^1/3

built in functions Matlab has hundreds of built in functions to do more complicated math  sqrt(9)  log10(1000)  log(10)  pi  cos(pi)  i  exp(i*pi)

Variables Usually we need to hang on to the result of a calculation  We need a way to name memory for storage  Variable--name of a place in memory where information is stored r = 8/10 r s=20*r score = 4 * r + s z = sqrt(1000) z = sqrt(s)

Assignment Operator = means “gets” Translation: MATLAB: r = 8/10 ENGLISH: r “gets” the value 8/10 OK in Math x + 2 = 20 NOT OK IN MATLAB !! (only variable on Left Side)

Expressing Math in MATLAB 2 yx _______________ x-y 3x _______________ 2y

Saving Work in Matlab Script (.m) files You’ll want to build up complex calculations slowly  Try, correct, try again, improve, etc .m Files store your calculations  Can be edited in Matlab  Can be re-executed by typing the file name

Example.m file Volume of a Cylinder. The volume of a cylinder is V=  r2h. A particular cylinder is 15 meters high with a radius of 8 meters. We want to construct another cylinder tank with a volume 20% greater, but with the same height. How large must its radius be? The session follows:  r = 8;  h = 15;  V = pi*r^2*h  V = V + 0.2*V  adds 20% to V  r = sqrt(V/ (pi * h)) Put this in a file called cyl_volume.m to save retyping

Solve some problems! Pick any problem, solve it and print your solution.m file Write name, turn in You may wish to save your class.m files on a USB drive