Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need codes for 1. all, specially part(d), attaching the question and the guide (uploaded file). Also, without guide file, codes can be generated from the

need codes for 1. all, specially part(d), attaching the question and the guide (uploaded file). Also, without guide file, codes can be generated from the questions asked. Pls do help,,,, THANK-YOUimage text in transcribedimage text in transcribedimage text in transcribed

1. A three-section bridge column consisting of two rectangular sections of different widths and connected with a trapezoidal section, with dimensions specified in Figure 2 within a Cartesian frame with the origin O located at the bottom-left corner. Write a MATLAB program using functions to determine the total area and the location o 20 m 8 m 6 m h2 6 m W3 Figure 1: Cross-section of a bridge column a) Create variables i. Save dimensions to variables wi, hi, ... h3 b) Build elementary functions: i. Define geo_rectangle(width, height) ii. Define geo_trapezoid(width, height) (see uploaded file) iii. Within each function definition, calculate area, location of x,y coordinates of the centroid measured from the bottom-left corner, i.e. origin. iv. Save functions in lib/ folder. c) Geometric properties of bridge column: i. Compute area, x and y coods of each section. Save results in separate variables, i.e. areal, xi, yi, area2, x2, y2, area3, x3, y3. ii. Find x, y cood of the column, using the a function geo_column that determines the area, x and y cood of the column section. Within the function definition, use relations areaCol = areal + area2 + area3 c) Geometric properties of bridge column: i. Compute area, x and y coods of each section. Save results in separate variables, i.e. areal, x1, yi, area2, x2, y2, area3, x3, y3. ii. Find x, y cood of the column, using the a function geo_column that determines the area, x and y cood of the column section. Within the function definition, use relations areaCol = areal + area2 + area3 xCol = (x1.*areal + x2.*area2 + x3.*area3)./ areaCol yCol = (y1. *areal + y2. *area2 + y3.*area3)./ areaCol Function inputs: areal, area2, area3, x1, y1,x2,y2, x3, y3 and outputs: areaCol, Col, yCol d) Print results: Using fprintf, print area, x and y coordinates of each section measured from point o in the table format: column width=10, precision=3, alignment=left. Section-1 Section-2 Section-3 Total area x_center area1x 1 area2 x2 area3 x3 areaCol Col y_center y1 y2 y3 yCol 2. From previous examples we are able to determine the center of mass (CM) of a three-section column for a given set of dimensions. However we can create a function to input ANY other value for these dimensions and determine the CM for a given configuration. (i) Create a function three col that inputs wi, hi, h2, h3, w3 and outputs areaCol, xCol, ycol. Save this function in lib/ folder. function [area_rectangle, x_rectangle, y_rectangle] = geo_rectangle (height,width) GEO_RECT Computes geometric properties of a rectangle area_rectangle = height*width; Y_rectangle = height/2; x_rectangle = width/2; end function [area_trapezoid, x_trapezoid, y_trapezoid] = geo_trapezoid(w3, w1, h2) & GEO_trapezoid Computes geometric properties of a trapezoid area_trapezoid = h2* (w3+wl)/2; c = (wl - W3)/2; x_trapezoid = (2*w3*c+w3^2+c*wl+w3w1+w1^2)/(3* (W3+w1)); y_trapezoid = h2* (2*w3+wl)/(3* (w3+wl)); end function [areacol, Col,....] = geo_column (x1,x2,x3, ....) % This function calculates geometrical properties like total area and % centroid coordinates end function (%output variables] = three_col (% input variables). function call for geo_rectangle, geo_trapezoid to get areas and x1, yl.... of function call for geocolumn to get centroid and total area. end

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

Students also viewed these Databases questions

Question

1. Describe the power of nonverbal communication

Answered: 1 week ago