EGR 103/Spring 2015/Lab 2

From PrattWiki
Revision as of 16:13, 20 January 2015 by DukeEgr93 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

2.1 Introduction

The main purpose of this lab is to go through the process of writing a complete program to load a data set, manipulate the values, perform some analysis, and create a graph. The following is a companion piece to the lab handout itself. The sections in this guide will match those in the handout.

2.2 Resources

You will want to have a browser open with the MATLAB:Script and MATLAB:Plotting pages available to you.

2.3 Getting Started

As with last week, you will want to use the

ssh -XY netid@login-teer.oit.duke.edu

command in MobaXterm to connect to a Teer machine. Follow the directions to connect, change into your EGR103 directory, make a new folder, change into it, copy things, then make a copy of your lab. Finally, start MATLAB.

2.3.1 Preview

Read and work through this section, taking notes as you go on what is discussed.

2.3.2 .m Files

Read and work through this section, taking notes as you go on what is discussed.

2.4 Cantilever Beam Analysis

Read and work through this section, taking notes as you go on what is discussed, especially how the equation was arranged to get displacement as a function of force based on how the experiment was conducted.

To see the data set, go to UNIX and type

more Cantilever.dat

You will see an 8x2 array of data. The first column of numbers is the amount of mass in kg placed on the end of the beam - for this experiment, it ranged from 0 to about 0.8 kg (i.e. about 8 N). The second column of numbers if the displacement measured in inches, because that is what the device I used measures in. You should always take data in the original units of the device; you can convert it later.

Typically, data sets should have descriptions such as the items in the data set, units, perhaps the equipment and the person who took the measurements. For this week, however, I wanted to give you a rectangular array of data that MATLAB can easily load.