Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**Write a MATLAB function [s,fJ-beam (D, y) First, the function should check whether a square matrix D is an n n matrix, where n length(y),

image text in transcribed

**Write a MATLAB function [s,fJ-beam (D, y) First, the function should check whether a square matrix D is an n n matrix, where n length(y), and whether D is invertible. If it is not the case, the program terminates and returns a message that D is not a flexibility matrix for the deflection vector y. It will also output an empty matrix S and an empty vector f. If the conditions hold, the program will proceed with the two tasks (1) calculate and output the vector fof forces for the given deflection vector y using the stiffness matrix D1, which we denote a matrix S (2) verify that the physical meaning of the jth column (j-l:n) of the stiffness matrix S is the vector of the forces that have to be applied to n points to produce a unit deflection at the pointj (j-1:n) and zero deflections at the other points. If your code shows that it is true, output the message that the physical meaning of the stiffness matrix is valid, otherwise, the message could be "I may need to check the code". %Explain a meaning of the negative entries of the matrix S Note: you may need to use closetozeroroundoff function in your code **Type the function beam in your diary file Run the function beam on the following sets of variables (a) D-0.1rand(4), y-randi([20 50], 3.1) (b) D-001 *rand(6). -0. I *randi([ 10 201. 6, 1 ) For more information, please refer to Section 2.2, Example 3 of the textbook **Write a MATLAB function [s,fJ-beam (D, y) First, the function should check whether a square matrix D is an n n matrix, where n length(y), and whether D is invertible. If it is not the case, the program terminates and returns a message that D is not a flexibility matrix for the deflection vector y. It will also output an empty matrix S and an empty vector f. If the conditions hold, the program will proceed with the two tasks (1) calculate and output the vector fof forces for the given deflection vector y using the stiffness matrix D1, which we denote a matrix S (2) verify that the physical meaning of the jth column (j-l:n) of the stiffness matrix S is the vector of the forces that have to be applied to n points to produce a unit deflection at the pointj (j-1:n) and zero deflections at the other points. If your code shows that it is true, output the message that the physical meaning of the stiffness matrix is valid, otherwise, the message could be "I may need to check the code". %Explain a meaning of the negative entries of the matrix S Note: you may need to use closetozeroroundoff function in your code **Type the function beam in your diary file Run the function beam on the following sets of variables (a) D-0.1rand(4), y-randi([20 50], 3.1) (b) D-001 *rand(6). -0. I *randi([ 10 201. 6, 1 ) For more information, please refer to Section 2.2, Example 3 of the textbook

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions