A group of students have collected mechanical data on a mts

Assignment Help Applications of MATLAB
Reference no: EM13371413

A group of students have collected mechanical data (on a MTS machine) from chicken cartilage.  Specifically, they have collected data during a stress-relaxation test from 3 samples of femoral and 3 samples of tibial cartilage, and have generated data seen in the figure below.

1270_Fit the exponential function to the relaxation data.png

            Their cruel, some might say evil, instructor has asked them to determine if the femoral and tibial cartilage are significantly different by analyzing the data with the following exponential equation.

                        L(t) = A e-t/T +B

Where L is the load (y-axis), t is time (x-axis) and A, tau and B are parameters that describe the relaxation.  To finish their analysis, students will have to determine A, tau, and B for each specimen tested (3 femur + 3 tibia).

Your assignment is to write MATLAB code which will allow these poor helpless students to complete their assignments, by using the lsqcurvefit function.

Specifically you will be create 3 functions and 1 script which will:

1. read in the .dat file (including the header information, you already have this code!), with the added feature of being able to load in a 2nd file but remembering previous file's location.

2. plot load (y-axis) versus time (x-axis), and 'remove' prior to reading the minimum, and 60 seconds AFTER reaching the minimum load.

3. Fit the exponential function to the relaxation data and report the filename as well as the A, tau and B values.

4. Run all 3 functions in sequence to analyze ALL data

function_name - denotes a MATLAB function

PSEUDO-CODE functions:

1. ca02_fun1.m: [data import] - reads data from file, plots result

1.1. INPUT:  .dat file name [1xNs string array]

1.2. OUTPUT:  data [Ndx3 numeric array], c_labels [1x3 cell array], filename [1xNs]

1.3. look for figure with 'tag' 'relax-test'

1.4. if does not exist, create it, set 'tag' to 'relax-fit', set 'filename' to '*.dat'

1.5. use nargin, if < 1,

1.6. get old file name from 'filename' field

1.7. prompt user for file (uigetfile)

1.8. create new filename

1.9. set 'filename' to dat_filename for figure

1.10. call new function read_datfile

1.11. plot time (x-axis) vs load (y-axis)

1.12. label axes

2. ca02_fun2.m: [data processing/visualization] - find minimum point, and separate relaxation data

2.1. INPUT:  data (Ndx3 matrix)

2.2. OUTPUT:  data_realx (Nrx3 matrix)

2.3. find row with minimum load value (min)

2.4. determine time at for this row (t_start)

2.5. find last row at t_start + 60;

2.6. create a vector of rows from beginning to end of relaxation data

2.7. export only those rows as variable data_relax

2.8. overlay plot of just the relaxation data

3. ca02_fun3.m:  [least square curve fit] - fit an equation to the data and determine the parameters of the exponential

3.1. INPUT: data_relax [Nx3 numeric matrix]

3.2. OUTPUT:  fit_parameters [1x3 array]

3.3. lookfor object with 'tag' 'relax-fit' (findobj)

3.4. if you can't find it, create the figure with that 'tag'

3.5. make time your x-data (first remove the initial time point)

3.6. make -1*load your y-data

3.7. create inline exponential function 'x(1)*exp(-x_data/x(2))+x(3)','x','x_data'  (this is the function you will be 'fitting'.

3.8. plot time (x-axis) versus load (y-axis)

3.9. initialize x values

3.10. set lower limits

3.11. set upper limits

3.12. run lsqcurvefit get x_fit (fit parameters)

3.13. create an estimate of your y values based on x_fit

3.14. display output in work space (disp)

4. ca02_script.m:  [script to run all programs] - this script combines all programs so you can easily analyze many files.

4.1. Outputs from ca02_fun1, are inputs to ca02_fun2

4.2. outputs from ca02_fun2 are inputs for ca02_fun3

4.3. create a 'formatted' output txt with the following fields

4.4. 'filename (stripped of path), A, tau, B

Reference no: EM13371413

Questions Cloud

1 labforensic collection and analysis of persistent : 1 labforensic collection and analysis of persistent datawrite up your lab experience including the necessary steps
1 write a statistical laboratory report using the : 1 write a statistical laboratory report using the guidelines in the assigned article how to write a statistical report.
Arraysq1-write a program to find average marks obtained by : arraysq1-write a program to find average marks obtained by 10 students in a test along with algorithm?q2 -write a menu
Question equity transactions and adjustments statement of : question equity transactions and adjustments statement of changes in equity.on 30 june 2013 the equity of lilium ltd
A group of students have collected mechanical data on a mts : a group of students have collected mechanical data on a mts machine from chicken cartilage.nbsp specifically they have
Whats being asked of me i cant do i need help i need this : whats being asked of me i cant do. i need help i need this spreadsheet done because i am sooooo lost. it says refer to
Work-based learning log guidelinesyou must choose and : work-based learning log guidelinesyou must choose and describe one to three theories ideas or management practices from
Build a new and different simulation of your own using : build a new and different simulation of your own using newtons laws of motion and notepad. nbspfor example choose one
Question 1examine how the emergence of the internet is : question 1examine how the emergence of the internet is likely to affect the competitive landscape of the banking

Reviews

Write a Review

Applications of MATLAB Questions & Answers

  Question 1 consider the images distributed or collected as

question 1 consider the images distributed or collected as a part of your project. develop the equivalent of a low pass

  In a shell-and-tube heat exchanger one fluid passes through

in a shell-and-tube heat exchanger one fluid passes through a central tube while another fluid flows through an outer

  Nbspd control design

nbspd control design using

  Problem 1 the total transistor count on ic produced over

problem 1 the total transistor count on ic produced over the last 35 years is contained in the file

  Matlab ndash discrete time simulationquestion 1 discrete

matlab ndash discrete time simulationquestion 1 discrete time system is given in attachment write a matlab m file to

  Economic formulas are available to compute annual payments

economic formulas are available to compute annual payments for loans. suppose that you borrow an amount of money p and

  Regarding the program i want the following1we know that

regarding the program i want the following1.we know that there is a symmetry in the rod so the point at 0.2 must be

  1 we know that there is a symmetry in the rod so the point

1. we know that there is a symmetry in the rod so the point at 0.2 must be equal to the point at 0.8 but the output was

  If a is an m by n rectangular matrix with m gt n and if c

if a is an m by n rectangular matrix with m gt n and if c is a vector with n components then a c y can not usually be

  You are expected to submit properly commented script files

you are expected to submit properly commented script files that solve the problem stated. your script files should

  Questiondetails areimpact of zigbee on telecommunication

questiondetails areimpact of zigbee on telecommunication systems. in this report need to either do some measurement or

  A wood circular cylinder having a specific gravity s of 054

a wood circular cylinder having a specific gravity s of 0.54 floats in water as shown in figure p4.nbspfigurefor a

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd