Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a simple loop problem i cant seem to figure out. im sure i can do the rest i just need a loop function that doesnt

a simple loop problem i cantimage text in transcribedimage text in transcribedimage text in transcribed seem to figure out. im sure i can do the rest i just need a loop function that doesnt fail. thank you.

27 28 %% Problem 3 (30pts) clc: clear E-29000; Fy=50 ; r-4.71 sqrt 32 (E/Fy) 35 36 37 38 z-linspace (1,200, 500) Fe=zeros (1, 500) ; Fcr-zeros (1,500) 41 for k=1:500 Fe=kt (3.14152-E/z"l; 43 end Create a script with the following functionality (use semicolons to suppress all variables): .Enter a cle in Line 1 to clear the Command Window after each use. Enter a clear in Line 2 to clear all previously defined variables. Next, using steel properties for A992 steel, define the following variables within the script: E = 29000 ksi (elastic modulus) [Use E as the variable namel [Use Fy as the variable name] [Use r as the variable name] o o Also, compute r (slenderness limit) Next, use the linspe function to create a row vector of 500 values spaced evenly from 1 to 200 Assign this vector using z as the variable name. Create two empty row vectors of 500 zeros each using the zeros ) function. Assign one vector using Fe as the variable name and another using Fer as the variable name. Next, compute the elastic buckling stress using the rightmost formula above. Assign this vector using Fe as the variable name. o Instead of using the operator, create a for-loop using k as the index variable. The loop should run from a value of k-1 to a value to k-500. After your loop is complete, Fe should still contain 500 terms. o In order to compute Fa values, create an if-else statement nested in a for-loop with the following features (use k as the index variable): Use k as the loop index variable. The loop should run from a value of k-1 to a value to k-500. o o For each iteration, the nested if-else statement should determine whether or not z (k) is less than or equal to r. If this is true, then Fa should be computed using the upper expression. If not, then Fa should be computed using the lower expression . After your loop is complete, Fer should still contain 500 terms. Plot the curve (use z as the x-axis data and Fer as the y-axis data): . o Assign this plot using fig as the variable name. o Title the chart as "Steel Column Capacity." Label the x-axis "Slenderness" and the y-axis "Critical Buckling Stress (ki)." Plot such that the x-axis is bounded from 0 to 200 and the y-axis is bounded from 0 to 55. Also, turn the gridon o o Done correctly, your plot should look like the image below. Use the saveas/print command to export the plot as olumn.jpg Problem 3(30 points) In structural engineering, we calculate the capacity (also known as the "critical" buckling stress, F) ofa steel column based on the equations shown below. 0658%), :s r = 4.71 E cr 0.877Fz>r

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions