Week 11- Project week 2 - Diffusion

Slides:



Advertisements
Similar presentations
1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 10.
Advertisements

M AT L AB Programming: scripts & functions. Scripts It is possible to achieve a lot simply by executing one command at a time on the command line (even.
1.3 ARRAYS, FILES, AND PLOTS + FOURIER SERIES BY MR. Q.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 19P. 1Winter Quarter MATLAB: Script and.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Introduction to Matlab. I use Matlab for: Data analysis Data plotting Image Analysis Also – Simulations (solving odes/pdes/finite element methods) – Minimisations,
Maze Running Robots EGR106 Project Spring Project Goal Computer control (through a Matlab program) of a Lego robot to: 1.Explore a maze (start to.
What is entry A in the matrix multiplication: ( a) 1 (b) -2(c) 5 (d) 11(e) 13 (f) 0.
SOLVING SUDOKU WITH MATLAB VERIFICATION FUNCTION correctness verification of the puzzle: checks if the current element appears twice in the same line,
2-1 Relations and Functions
Array Math.
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.
EGR 106 Intro to Engineering II Engineering problem solving using MATLAB Text: Amos Gilat, MATLAB An Introduction with Applications, Wiley 2004 ISBN
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
1 Functions 1 Parameter, 1 Return-Value 1. The problem 2. Recall the layout 3. Create the definition 4. "Flow" of data 5. Testing 6. Projects 1 and 2.
1 Week 3: Vectors and Matrices (Part III) READING: 2.2 – 2.4 EECS Introduction to Computing for the Physical Sciences.
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
Again, solve inequalities the same way you solve equations…use the OPPOSITE operation. Remember that when you are MULTIPLYING or DIVIDING by a NEGATIVE.
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.
EGR 106 – Functions Functions – Concept – Examples and applications Textbook chapter p15-165, 6.11(p 178)
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
1 Week 1: Variables, assignment, expressions READING: 1.2 – 1.4.
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
Math – What is a Function? 1. 2 input output function.
Introduction to MATLAB 7 MATLAB Programming for Engineer Hassan Migdadi Spring 2013.
ELECTRIC CIRCUITS ECSE-2010 Spring 2003 Class 21.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2012.
1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 10.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 1: Variables & Arrays Wednesday 03 Sept 2014 EGR 115 Introduction to Computing for Engineers.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
More chemical quantities Percent composition and empirical formulas.
Solving 1-Step Equations 2 An Equation is Like a Balance.
Chapter 1 C++ Templates (Sections 1.6, 1.7). Templates Type-independent patterns that can work with multiple data types. Function Templates  These define.
Introduction to Literate Programming in Matlab 2WN50 – Week programming-in-matlab.pptx?dl=0.
Week 10- Project week 1 - Diffusion Today: – Project forms – Assignment – Examples – Second Test.
EGR 106 – Week 5 – 2-D Plots Question : Why do engineers use plots? Answer : To analyze, visualize, and present data. Matlab has many useful plotting options.
EDL 525 Week 6 Individual Needs Assessment Matrix Part II Review and complete the Needs Assessment Matrix – Part II The Needs Assessment Matrix Part I.
IT 210 Week 2 Individual Application-Level Requirements To purchase this material link
IT 210 Week 7 Chapter 5 Programming Problems To purchase this material link Programming-Problems.
© Dr. Elmer P. Dadios - DLSU Fellow & Professor
State Space Representation
EGR 115 Introduction to Computing for Engineers
Class Diagrams Oct 20, 2006.
Temperature Conversions
MATLAB: Structures and File I/O
Additive and Multiplicative Relationships
VERTICAL LINE TEST GRAPHS can represent functions.
Multiplication and Division by Powers of Ten
Autonomous Cyber-Physical Systems: Dynamical Systems
Use of Mathematics using Technology (Maltlab)
[ ] [ ] [ ] [ ] EXAMPLE 3 Scalar multiplication Simplify the product:
Problem Solving Lab – Part C
Rate Process and Diffusion
Week 12- Project week 3 - Diffusion
Getting Started With Simulink
State Space Analysis UNIT-V.
C-to-LC3 Compiler Over the course of the next two weeks, you will build a program that will compile C code to LC-3 assembly language Don't panic! You.
To be able to identify and use function notation.
Fourier Series September 18, 2000 EE 64, Section 1 ©Michael R. Gustafson II Pratt School of Engineering.
Bellwork 4/26 Finish worksheet 12.6 (1-10)..
Very Old Introduction to Matlab for EGR 220
Multidimensional array
3.8 Solving Equations Involving Absolute Value
VERTICAL LINE TEST GRAPHS can represent functions.
Functions Unit Pre-Algebra.
(c) Project Maths Development Team 2011
Input, Variables, and Mathematical Expressions
' · · ,.-.., '' !'",. -,..._ ·-.·-...;.· -
Chapter 2 Functions, Equations, and Graphs
Presentation transcript:

Week 11- Project week 2 - Diffusion Today: Project forms Element by element math

Element by element math Remember that MATLAB assumes matrix operations for multiplication and division. Need element by element do use the period”.” declaration before the math operation to declare element by element math

Examples of Element by element function D=diffusionC(T); %Input argument is: %T: temperature in K %Output argumet is: %D: diffusion coefficient m^2/s Do=2.2*10^(-4); Q=29.3*10^3; R=1.987; D=Do*exp(-Q./(R*T)); function D=diffusionC(T); %Input argument is: %T: temperature in K %Output argumet is: %D: diffusion coefficient m^2/s Do=2.2*10^(-4); Q=29.3*10^3; R=1.987; D=Do*exp(-Q/(R*T)); Above function runs, but cannot be linked into a program that requires more than a single D value. Need “.” after Q

Plot Diffusion Data % Plot demo first assignment T = 300:1:1000; D=diffusionC(T); T=(1000./T); Note element by element again with period after 1000. x=T; y=log10(D); plot(x,y,'linewidth',2) xlabel('Temperature (1000/T,K)') ylabel('Diffusivity (m^2/sec)') title('Dr Brown Plot EGR 106 Spring 2008') [xv,yv]=ginput(1) xv=((1./xv)*1000)-273 yv=10^yv gtext (['At a temperature of ',num2str(xv,3),' (^oC), Carbon diffusivity is ',num2str(yv,2),' (m^2/sec)'])

Output From “ginput and gtext”