Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: Question 1 (40%): Type this matrix in Octave and use Octave to carry out the following instructions. Your answers must include Octave statements or

image text in transcribed
image text in transcribed
image text in transcribed
Note: Question 1 (40%): Type this matrix in Octave and use Octave to carry out the following instructions. Your answers must include Octave statements or expressions A= 6 13 15 5 a) Create a 3 x 4 array B consisting of all elements in the second through fourth rows of A b) Create a 2 x 3 array C consisting of all elements in the first two rows and the last three columns of A c) Add all elements in each column of A and then update A to include the result as the last row of . d) Add all elements in each row of the the column row of A iginal matrix A and then update A to include the result as Question 2 (40%): A company must purchase five kinds of material. The following table gives the price the company paid per fon for each material, along with the number of tons purchased in the months of May, June, and July Material 1 2 3 4 5 Price($/ton) 200 450 300 150 400 Quantity Purchased (tons) May June July 5 4 6 3 2 4 6 5 3 3 5 4 2 4 3 Use Octave to answer the following questions (Your answers must include Octave statements or expressions) B) Create a 5 x 3 matrix containing the amounts spend on each item for each month b) What is the total spent in May? In June, in July? c) What is the total spent on each material in the three-month period? d) What is the total spent on all materials in the three-month period? Test Predictions on 9 DOLL Question 3 (20%): Create a structure array that contains the following information fields concerning the road bridges in a town: bridge location, maximum load (tons). year build, year due for maintenance a) Enter the following data into the structure array: Location Smith St. Hope Ave. Clark St. Max load 80 90 85 Year built 1928 1950 1933 Due for maintenance 2021 2028 2024 b) Edit the structure array created in a) to change the maintenance data for Clark St bridge from 2024 to 2022 c) Add the following bridge to the structure array created in a). Location North Rd Max. load 100 Year built 1990 Due for maintenance 2030 iction on a

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

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions