Create two separate column vectors for each year data

Assignment Help Other Engineering
Reference no: EM131941527

Problem 1 -

Let

101_figure.png

Perform the following operations in the order given:

a) Divide column 2 by √3.

b) Add the elements of the third row to the elements in the fifth row (the third row remains unchanged).

c) Multiply the elements of the first column by the corresponding elements of the fourth column and place the result in the first column.

d) Set the diagonal elements to 2.

e) Print the matrix z either row-wise or column-wise.

Problem 2 - In structural engineering, we calculate the capacity (also known as the "critical" buckling stress, Fcr) of a steel column based on the equations shown below.

1831_figure1.png

Create a script with the following functionality (use semicolons to suppress all variables):

Enter a disc 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 name]
  • FY = 50 ksi (yield stress) - [Use Fy as the variable name]
  • Also, compute r (slenderness limit) - [Use r as the variable name]

Next, use the linspace () 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 Fcr as the variable name.

Next, compute the elastic buckling stress using the rightmost formula above. Assign this vector using Fe as the variable name.

  • 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.

In order to compute Fcr 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.
  • 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 Fcr should be computed using the upper expression. If not, then Fcr should be computed using the lower expression.

After your loop is complete, Fcr should still contain 500 terms. Plot the curve (use z as the x-axis data and Fcr as the y-axis data):

  • Assign this plot using fig as the variable name.
  • Title the chart as "Steel Column Capacity." Label the x-axis "Slenderness" and the y-axis "Critical Buckling Stress (ksi)."
  • 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 grid on.
  • Done correctly, your plot should look like the image below. Use the saveas () command to export the plot as "column.jpg."

1057_figure2.png

Problem 3 - Use the import data tool to import the data set representing weight-in-motion data collected for highway/bridge design purposes that was discussed during In-Class Exercise 3 (GVW.txt). Create and export two separate column vectors for each year's data. Name these column vectors Y2002 and Y2004, respectively. Save these vectors as .mat files and upload them into your network drive.

  • Note: When you import the data, be sure to exclude the first row since that is the header row.
  • Note: Also, set the "Unimportable Cells" option to "Exclude Rows With..."
  • Also, in order to avoid errors, run the Import Data Wizard for the 2002 data, export the matrix using save, then run the Wizard again for 2004 data.

Once you've obtained two .mat files (one for each year's data), write a script with the following statistical analysis capabilities (use semicolons to suppress all variables):

Enter a clc in Line 1 to clear the Command Window after each use.

Enter a clear in Line 2 to clear all previously defined variables.

Next, load the data using load Y2002 and load Y2004, respectively, on Lines 4-5 (leave Line 3 blank).

Note: For this command to work, the .mat files must be in the same folder as your script!

For the 2002 data, write code to compute the following statistics.

  • The total number of data points - [Use a1 as the variable name]
  • The minimum value - [Use b1 as the variable name]
  • The median value - [Use c1 as the variable name]
  • The maximum value - [Use d1 as the variable name]
  • The average value - [Use e1 as the variable name]
  • The standard deviation - [Use f1 as the variable name]

Repeat for the 2004 data. Name the variables a2 through f2, respectively.

Finally, plot a histogram for each dataset using histogram (). For example, for the 2002 data:

  • Assign the plot using fig1 as the variable name.
  • Plot the histogram from 30 to 100 kips with bins of 5 kips. Title the chart as "2002 Gross Vehicle Weights." Label the x-axis "Weight Ranges (kip)" and the y-axis "Frequency." Also, turn the grid on.
  • Use the saveas () command to export the plot as "2002gvw.jpg.

Repeat for the 2004 data. Assign the plot using fig2 as the variable name.

Attachment:- Assignment Files.rar

Reference no: EM131941527

Questions Cloud

What volume of naoh must be added to change the ph of buffer : A buffer is made by using 45.0 ml of a 0.750 M solution of HC3H5O2 (ka= 1.3 X 10-5) and 55.0 ml of .700 M NaC3H5O2. What volume of 0.10 M NaOH must be added
Describe the overall project goals and your role in project : Explain how the project scope was clearly defined at the beginning of the project or how it was not clearly defined.
Market research in the international market : Critically examine how and why they should strategically plan and undertake Market Research in the international market.
List the seven most important stories of reading : List the seven most important stories of reading. Main theme: What or whom is it about? Explain. Characters: Mention and describe the characters in the story.
Create two separate column vectors for each year data : Create and export two separate column vectors for each year's data. Name these column vectors Y2002 and Y2004, respectively
What about advertising or mass media : Is Capitalism still functioning in this future? What about advertising or mass media? What do people do in their leisure time in the future?
Outline the organisation mission : You might need to outline the organisation's mission, goals, objectives and operations and explain how a proposed project will relate to them.
Write review of the article- transformational leadership : Write a page review of the article- Transformational leadership or the iron cage: Which predicts trust, commitment and team efficacy?.
Healthcare policy issue discussion : How do the views of non-healthcare professionals (legislators or policymakers) contribute to the healthcare policy issue discussion?

Reviews

Write a Review

Other Engineering Questions & Answers

  Find the binary and hex values

Find the binary and hex values for the given numbers for an 8-bit system- What is the reason for this erroneous phenomenon? Explain with illustrations.

  Explain how the characteristics of good design

Explain how the characteristics of good design contribute to the product quality. For example how do coupling, cohesion, and modularity affect reliability of systems?

  Calculate normalised values of the mid-point values

Calculate normalised values of the mid-point values. Compare these to normalised end-point values and discuss why there may be differences. Use European and Worldwide values.

  Determine the logical value of the signal

Aperiodic Signal Encoding: Design a signal encoding that uses the minimum number of transitions and for which one of the signal lines always reflects.

  Multiplexing-modulation method

Twelve different message signals, each with a bandwidth of 10 kHz, are to be multiplexed and transmitted. Determine the minimum bandwidth required for each method if the multiplexing/modulation method used is

  What is the cutoff frequency you measured from simulation

What is the cutoff frequency you measured from the simulation? Based on the cut off frequency, what type of active filter is constructed in this lab?

  How many bits are needed for the opcode

How many bits are needed for the opcode - How many bits are needed to specify the register - What is the largest unsigned binary number

  What is the actual volumetric flow in the well

What is the actual volumetric flow in the well?

  Determine the return period for a discharge of 1600 cfs

Determine the return period for a discharge of 1600 cfs and (2) the discharge with a return period of 25 years.

  Problem regarding the material handling

Shown in the figure below is a layout of an existing warehouse. One-way aisles are 8ft wide, while two-wayaisles are 16 ft wide (Direction of one-way aisles are depicted with arrows).

  Corresponding velocity of the center

A uniform sphere of radius r is placed at corner A and is given a slight clockwise motion. Assuming that the corner is sharp and becomes slightly embedded in the sphere, so that the coefficient of static friction at A is very large, determine

  An example of a product-of-sum expression

1. Which answer is an example of a product-of-sum (POS) expression?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd