Problem 1 (20 points, Core Course Outcome #6)/MatlabGrader Develop a Matlab function mySimpson 38 that calculates I = fy(x)dr using the composite Simpson's 3/8 method for a set of discrete data points (x, y) that are equally spaced. If the number of subintervals is not divisible by 3 because there is 1 extra subinterval, calculate the integral of the last 4 subintervals using Simpson's 1/3 method. If there are 2 extra subintervals, calculate the integral for the last 2 subintervals using Simpson's 1/3 method. If the number of subintervals is zero (= 1 data point only), the function shall return a value of zero for the integral. If the number of subintervals is one (= 2 data points only), the function shall use the trapezoidal method on the single interval. If the vectors x and y are not of equal length, the function shall execute Matlab's function error("...") with an appropriate error message. As input the function shall take the column vectors x and y that contain the data points. As output the function shall give the calculated integral I. You may call/use any function developed in recitation, homework, and/or exams. Required submission: well commented function source code submitted to Matlab Grader using the Canvas link for Exam 6 - Problem 1 Problem 2 (35 points, Core Course Outcomes 6 & 11) A cantilevered beam of length L = 16 is made of a hybrid material that has a spatially varying product of the area moment of p(x) X El(x) L Figure 1: Sketch of cantilevered beam with varying load p(x) and varying EI(x). inertia and Young's modulus, EI(x,a), where a is a parameter describing the hybrid material composition with 2 ≤ a ≤5. The beam is subjected to a varying load p(x), see Figure 1 (positive values of p are pointing in the positive y direction). Recall that for the beam shown, the shear force F(x) at location r; is the bending moment M(r.) is F(x)= p(x)dx, the beam's slope (z;) as a result of the bending moment is and the beam's deflection y(r.) is 1 M(x)= -[" F(x)dx, 0(xi)= M(z) El(x,a) edz. y(x;) = 0 (x)dr. (1) (2) (3) (4) The load p(x) can be determined by calling the content hidden function loadbeam (x) available in the Canvas assignment. The input argument can be either a scalar value of a single location along the beam, or a column vector containing multiple locations. The output is p(x) at the given input location(s) as either a scalar (for a scalar input ) or a column vector. EI(x, α) can be determined by calling the content hidden function EIbeam (x, alpha) available in the Canvas assignment. Here alpha is the scalar value of a and the input argument x can be either a scalar value of a single location along the beam, or a column vector containing multiple locations. The output is EI(x, a) at the given input location(s) as either a scalar (for a scalar input) or a column vector. The content hidden Matlab function files loadbeam.p and EIbeam.p are available on Canvas in the exam assignment. For a = 3 and N = 32 equally sized intervals along the beam, determine the beam's deflection at it's end, y(L) using only integration methods covered in this class. Graph in separate plots the load p(x), the beam's shear force F(x), bending moment M(x), slope (2), and deflection y(x). Note that all quantities are dimensionless and Eq. (3) does require component-wise division ./ when calculating the integrand using vectors. Use column vectors throughout. State which integration method you have used. On Canvas, you will find a link to a MatlabGrader non-credit test for the script you code. The test let's you check whether your script will calculate the deflection at the beam's end correctly using Newton-Cotes integration techniques covered in class. It is entirely optional and will not earn any credit. Please see the description of the MatlabGrader problem for further details. Required submission to Gradescope: name of integration method used (named in code is not sufficient); beam's deflection at its end, y(L): 5 separate graphs showing p(x), F(x), M(x), 0(x), and y(x) respectively; printout of script and any additional functions not already submitted in prior homework/exams;

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter12: Review Of Calculus And Probability
Section12.5: Random Variables, Mean, Variance, And Covariance
Problem 5P
icon
Related questions
Question

using Matlab code

Problem 1 (20 points, Core Course Outcome #6)/MatlabGrader
Develop a Matlab function mySimpson 38 that calculates I = fy(x)dr using the composite Simpson's 3/8 method for a set of
discrete data points (x, y) that are equally spaced. If the number of subintervals is not divisible by 3 because there is 1 extra
subinterval, calculate the integral of the last 4 subintervals using Simpson's 1/3 method. If there are 2 extra subintervals, calculate
the integral for the last 2 subintervals using Simpson's 1/3 method.
If the number of subintervals is zero (= 1 data point only), the function shall return a value of zero for the integral. If the number of
subintervals is one (= 2 data points only), the function shall use the trapezoidal method on the single interval. If the vectors x and y
are not of equal length, the function shall execute Matlab's function error("...") with an appropriate error message.
As input the function shall take the column vectors x and y that contain the data points. As output the function shall give the
calculated integral I. You may call/use any function developed in recitation, homework, and/or exams.
Required submission:
well commented function source code submitted to Matlab Grader using the Canvas link for Exam 6 - Problem 1
Problem 2 (35 points, Core Course Outcomes 6 & 11)
A cantilevered beam of length L = 16 is made of a hybrid material that has a spatially varying product of the area moment of
p(x)
X
El(x)
L
Figure 1: Sketch of cantilevered beam with varying load p(x) and varying EI(x).
inertia and Young's modulus, EI(x,a), where a is a parameter describing the hybrid material composition with 2 ≤ a ≤5. The
beam is subjected to a varying load p(x), see Figure 1 (positive values of p are pointing in the positive y direction). Recall that for
the beam shown, the shear force F(x) at location r; is
the bending moment M(r.) is
F(x)=
p(x)dx,
the beam's slope (z;) as a result of the bending moment is
and the beam's deflection y(r.) is
1
M(x)=
-[" F(x)dx,
0(xi)=
M(z)
El(x,a)
edz.
y(x;) = 0 (x)dr.
(1)
(2)
(3)
(4)
The load p(x) can be determined by calling the content hidden function loadbeam (x) available in the Canvas assignment. The
input argument can be either a scalar value of a single location along the beam, or a column vector containing multiple locations.
The output is p(x) at the given input location(s) as either a scalar (for a scalar input ) or a column vector.
EI(x, α) can be determined by calling the content hidden function EIbeam (x, alpha) available in the Canvas assignment. Here
alpha is the scalar value of a and the input argument x can be either a scalar value of a single location along the beam, or a
column vector containing multiple locations. The output is EI(x, a) at the given input location(s) as either a scalar (for a scalar
input) or a column vector.
The content hidden Matlab function files loadbeam.p and EIbeam.p are available on Canvas in the exam assignment.
For a = 3 and N = 32 equally sized intervals along the beam, determine the beam's deflection at it's end, y(L) using only
integration methods covered in this class. Graph in separate plots the load p(x), the beam's shear force F(x), bending moment
M(x), slope (2), and deflection y(x).
Note that all quantities are dimensionless and Eq. (3) does require component-wise division ./ when calculating the integrand
using vectors. Use column vectors throughout. State which integration method you have used.
On Canvas, you will find a link to a MatlabGrader non-credit test for the script you code. The test let's you check whether your
script will calculate the deflection at the beam's end correctly using Newton-Cotes integration techniques covered in class. It is
entirely optional and will not earn any credit. Please see the description of the MatlabGrader problem for further details.
Required submission to Gradescope:
name of integration method used (named in code is not sufficient);
beam's deflection at its end, y(L):
5 separate graphs showing p(x), F(x), M(x), 0(x), and y(x) respectively;
printout of script and any additional functions not already submitted in prior homework/exams;
Transcribed Image Text:Problem 1 (20 points, Core Course Outcome #6)/MatlabGrader Develop a Matlab function mySimpson 38 that calculates I = fy(x)dr using the composite Simpson's 3/8 method for a set of discrete data points (x, y) that are equally spaced. If the number of subintervals is not divisible by 3 because there is 1 extra subinterval, calculate the integral of the last 4 subintervals using Simpson's 1/3 method. If there are 2 extra subintervals, calculate the integral for the last 2 subintervals using Simpson's 1/3 method. If the number of subintervals is zero (= 1 data point only), the function shall return a value of zero for the integral. If the number of subintervals is one (= 2 data points only), the function shall use the trapezoidal method on the single interval. If the vectors x and y are not of equal length, the function shall execute Matlab's function error("...") with an appropriate error message. As input the function shall take the column vectors x and y that contain the data points. As output the function shall give the calculated integral I. You may call/use any function developed in recitation, homework, and/or exams. Required submission: well commented function source code submitted to Matlab Grader using the Canvas link for Exam 6 - Problem 1 Problem 2 (35 points, Core Course Outcomes 6 & 11) A cantilevered beam of length L = 16 is made of a hybrid material that has a spatially varying product of the area moment of p(x) X El(x) L Figure 1: Sketch of cantilevered beam with varying load p(x) and varying EI(x). inertia and Young's modulus, EI(x,a), where a is a parameter describing the hybrid material composition with 2 ≤ a ≤5. The beam is subjected to a varying load p(x), see Figure 1 (positive values of p are pointing in the positive y direction). Recall that for the beam shown, the shear force F(x) at location r; is the bending moment M(r.) is F(x)= p(x)dx, the beam's slope (z;) as a result of the bending moment is and the beam's deflection y(r.) is 1 M(x)= -[" F(x)dx, 0(xi)= M(z) El(x,a) edz. y(x;) = 0 (x)dr. (1) (2) (3) (4) The load p(x) can be determined by calling the content hidden function loadbeam (x) available in the Canvas assignment. The input argument can be either a scalar value of a single location along the beam, or a column vector containing multiple locations. The output is p(x) at the given input location(s) as either a scalar (for a scalar input ) or a column vector. EI(x, α) can be determined by calling the content hidden function EIbeam (x, alpha) available in the Canvas assignment. Here alpha is the scalar value of a and the input argument x can be either a scalar value of a single location along the beam, or a column vector containing multiple locations. The output is EI(x, a) at the given input location(s) as either a scalar (for a scalar input) or a column vector. The content hidden Matlab function files loadbeam.p and EIbeam.p are available on Canvas in the exam assignment. For a = 3 and N = 32 equally sized intervals along the beam, determine the beam's deflection at it's end, y(L) using only integration methods covered in this class. Graph in separate plots the load p(x), the beam's shear force F(x), bending moment M(x), slope (2), and deflection y(x). Note that all quantities are dimensionless and Eq. (3) does require component-wise division ./ when calculating the integrand using vectors. Use column vectors throughout. State which integration method you have used. On Canvas, you will find a link to a MatlabGrader non-credit test for the script you code. The test let's you check whether your script will calculate the deflection at the beam's end correctly using Newton-Cotes integration techniques covered in class. It is entirely optional and will not earn any credit. Please see the description of the MatlabGrader problem for further details. Required submission to Gradescope: name of integration method used (named in code is not sufficient); beam's deflection at its end, y(L): 5 separate graphs showing p(x), F(x), M(x), 0(x), and y(x) respectively; printout of script and any additional functions not already submitted in prior homework/exams;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage