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

  Create the following graph which contains a piecewise

create the following graph which contains a piecewise function where a line exists in the first interval a parabola in

  Exercise 1 this le contains two arrays a and b each of

exercise 1 this le contains two arrays a and b. each of these arrays contains a number of 50 50 grayscale images of

  You will write a functionqr mygsqratypethe function mygsqr

you will write a functionqr mygsqratypethe function mygsqr should take as inputs an m times n real matrix a with m ge

  Anbspdesign and explain a computer-based simulation model

anbspdesign and explain a computer-based simulation model which you will use to estimate the probability that among 25

  P1 write the commands that will create the following matrix

p1 write the commands that will create the following matrix. you can use only special matrix commandsp2 two cars

  1 we can represent the equation of a circle

1. we can represent the equation of a circle parametrically by

  Exercise 1 in this exercise we will explore the discrete

exercise 1 in this exercise we will explore the discrete fourier transform dft and the fast fourier transform fft.a

  In this simulation we are going to explore the design of a

in this simulation we are going to explore the design of a recursive digital filter which might be usedvin a digital

  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

  Write a matlab function speed planetary n emesh first last

write a matlab function speed planetary n emesh first last arm that computes the speed of a given link in a

  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

  Select a suitable microcontroller from the pic18 family

select a suitable microcontroller from the pic18 family design simple interface hardware write and test some c programs

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