Solving Simultaneous Equations - Lab 5 | BAE 200, Lab Reports of Agricultural engineering

Material Type: Lab; Class: Computer Methods in Biological Engineering; Subject: Biological and Agricultural Engineering; University: North Carolina State University; Term: Unknown 1989;

Typology: Lab Reports

Pre 2010

Uploaded on 03/18/2009

koofers-user-o7x
koofers-user-o7x 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
BAE 200
Lab #5
DUE MONDAY SEPTEMBER 29 at 12 NOON
SUBMIT the files via WolfWare (http://courses.ncsu.edu/bae200/)
by MONDAY September 29th at 12 NOON.
ASSIGNMENT:
Chapter 9 - problems 6, 11, 13
Chapter 10 - problem 5
Chapter 11 - problem 3 (use fprintf to display the values and units) HINT:you can extract
rows or columns from an array (or table you create), and this may save you a
couple of lines of code (See p 144).
IMPORTANT!
- Only 1 script M- file must be submitted for this homework set. Name it
unityID_HWK5.m. You should also be working and saving your work in your workspace
locker.
- Use comments to state the problem, define all variables when needed, and to indicate
the function of MATLAB commands used. Also use units for your data in your comment
lines when applicable. If you generate a final answer that needs units - insert the
comment at the end of your code to indicate what those units should be. Feel free to
include code to display formatted results with units when applicable.
- Use clc,clear to begin each problem
- Use the pause function at the end of each set of program code to pause between each
problem (it requires the user to hit the enter key to start the next section of code)
- Failure to follow directions on the naming conventions for each file will result in a 5 point
deduction per file.
- In addition: Please bring in a printed copy of your M-File to class on Tuesday so we can
easily return comments.
Comments on Homework 3 - Why you should check your values by hand!
Problem Hints and Examples (work these first in Lab today):
Solving Simultaneous Equations
Examples
Chapter 9 - Work the steps on pages 256 - 257,Example 4, and Example on
p 260 (left division - the better alternative)
Chapter 10 -Solve Function to solve for symbolic variables p 277 (eq 4,5,6)
pf2

Partial preview of the text

Download Solving Simultaneous Equations - Lab 5 | BAE 200 and more Lab Reports Agricultural engineering in PDF only on Docsity!

1

BAE 200 Lab # DUE MONDAY SEPTEMBER 29 at 12 NOON SUBMIT the files via WolfWare (http://courses.ncsu.edu/bae200/) by MONDAY September 29 th^ at 12 NOON.

ASSIGNMENT: Chapter 9 - problems 6, 11, 13 Chapter 10 - problem 5 Chapter 11 - problem 3 (use fprintf to display the values and units) HINT:you can extract rows or columns from an array (or table you create), and this may save you a couple of lines of code (See p 144).

IMPORTANT!

  • Only 1 script M- file must be submitted for this homework set. Name it unityID_HWK5.m. You should also be working and saving your work in your workspace locker.
  • Use comments to state the problem, define all variables when needed, and to indicate the function of MATLAB commands used. Also use units for your data in your comment lines when applicable. If you generate a final answer that needs units - insert the comment at the end of your code to indicate what those units should be. **Feel free to include code to display formatted results with units when applicable.
  • Use clc,clear to begin each problem**
  • Use the pause function at the end of each set of program code to pause between each problem (it requires the user to hit the enter key to start the next section of code)
  • Failure to follow directions on the naming conventions for each file will result in a 5 point deduction per file.
  • In addition: Please bring in a printed copy of your M-File to class on Tuesday so we can easily return comments.

Comments on Homework 3 - Why you should check your values by hand!

Problem Hints and Examples (work these first in Lab today):

Solving Simultaneous Equations

Examples Chapter 9 - Work the steps on pages 256 - 257,Example 4, and Example on p 260 (left division - the better alternative)

Chapter 10 -Solve Function to solve for symbolic variables p 277 (eq 4,5,6)

2

Interpolation p 292- Interpolation is a technique in which we estimate a variable’s value between 2 known values.

Given the dataset above, linear interpolation allows you to estimate the values in between the known values using the following relationship:

( ) (^ )

( o ) o

o o y x x

y y y x x + −

1

1

MATLAB has the interp1 function to help you do this. It defaults to linear interpolation, but MATLAB also has other interpolation approaches shown on page

It follows the syntax yi = interp1(x,y,x (^) i,’method’), where yi is the interpolated value you are seeking, x and y are the horizontal and vertical components of the input data points (independent and dependent variables), x (^) i is the horizontal component of the interpolation point, and method refers to linear, cubic spline, etc. Examples Work through the example on p294 to the top of p 295 for practice. Note the additional plot function “axis” that allows you to define the limits of your x and y axes. Also use two different markers for your data.

Curve fitting, Numerical Differentiation and Integration (p300-323) May be useful in your future classes

x (^) o x x (^1)

y (^) o

y (^1) y