91.5k views
1 vote
Write a MATLAB script that (1) imports the compression test data for each bone sample, (2) uses custom functions to compute the stress and strain, (3) overlays plots of stress vs. strain (strain on the x-axis and stress on the y-axis) for each bone sample, and (4) displays the ultimate compression strength for each bone sample. In order to receive full credit you must: 1. Begin your script file with a comments section including the following: a. The name of the program and a brief description of the purpose of the program.b. The date created and the creator’s name in the second line.c. The definitions of the variable names for every input and output variable. Include definitions of variables used in the calculations and units of measurement for all input and all output variables.d. The name of every user-defined function called by the program.

1 Answer

4 votes

Answer:

MATLAB script is given below

Step-by-step explanation:

/Practice with inheritance, polymorphism, and Abstract Data Types

//header file for Polygon class

#ifndef MYPOLY_H

#define MYPOLY_H

class myPoly

{

public:

//constructor

//const reference pass because the values w and h don't change and reference avoid the time it takes to copy large

// objects by value (if there were any)

myPoly();

myPoly(const float & w, const float & h);

//destructor

virtual ~myPoly();

//accessors

float getWidth();

float getHeight();

void setWidth(const float & w);

void setHeight(const float & h);

virtual float area() = 0;

private:

float width, height;

};

#endif

User Akashii
by
5.3k points