Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IGNORE TEXT FILE REQUIREMENT. Create a Matlab code that will: a) read in data fr

ID: 3028147 • Letter: I

Question

IGNORE TEXT FILE REQUIREMENT.

Create a Matlab code that will: a) read in data from a file called "S5input.txt" with the following format: Line 1: a single integer n, which is the number of elements in the system Line 2: a single integer iopt, which specifies which nodes are fixed (displacement equal to zero) for the given system if iopt = 1, then node 1 (at x = 0) is fixed if iopt = 2, then node n+1 (at x = L_tol) is fixed if iopt = 3, then both node 1 and node n + 1 are fixed if none of the above values are input, it should default to iopt = 1 Line 3 through to the end of the file, which is line (n + 2): three real numbers on each line that represent, for elements 1 through n, the values of A, E, and L in mks units; b) compute the element stiffness matrix coefficients; c) based on the value of iopt, compute the proper reduced global stiffness matrix; and, d) write to screen the reduced global stiffness matrix in a user friendly fashion (i.e. easy to read and with units labeled). When your code is working, test it by using the information corresponding to problem #5 in the ID Bar FEM notes. Show that your code's solution for the reduced global matrix agrees with the posted "by hand" solution. As you did for S4, you should create the input file; also, only a print-out of the code and a print-out of the output screen should be submitted.

Explanation / Answer

Text file is missing

Dear sir/ madam

without giving the text file how we identify the line

n = 100;'

for i = 1:n

A= [1,n];=1

if ( ipout ==1)

disp( 'x =', 0)

elseif (ioput = 2)

disp('x = ', Ltot)

elseif(iopt =3)

disp(n+1)

else

disp('none')