Begin a new script and start a new code cell for Problem 1 by using 88....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Begin a new script and start a new code cell for Problem 1 by using 88. Use rand to create an 8 x7 matrix A of random numbers in the range [0, 1]. (i) In one line of code, change rows 3 and 6 of A to two. (ii) Next, use one line of code to change columns 2 through 5 of A to three. (iii) Next, use one line of code to change elements of A that are in odd numbered rows and in even numbered columns to 0.5 (i.e. A(1,2), A(1,4), A(1, 6)..) (iv) Finally, use for loops and if statements to change all elements in A that are less than 0.5 to zero. Hint: Do a help search on size, :, for, if Begin a new script and start a new code cell for Problem 1 by using 88. Use rand to create an 8 x7 matrix A of random numbers in the range [0, 1]. (i) In one line of code, change rows 3 and 6 of A to two. (ii) Next, use one line of code to change columns 2 through 5 of A to three. (iii) Next, use one line of code to change elements of A that are in odd numbered rows and in even numbered columns to 0.5 (i.e. A(1,2), A(1,4), A(1, 6)..) (iv) Finally, use for loops and if statements to change all elements in A that are less than 0.5 to zero. Hint: Do a help search on size, :, for, if
Expert Answer:
Answer rating: 100% (QA)
clear all clear clc create an 8x7 matrix A of random numbers within the range0 1 A rand8 7 dispA fprintf change the rows 3 and 6 of A to two A36 2ones... View the full answer
Related Book For
Posted Date:
Students also viewed these finance questions
-
Given an array, A, of n numbers in the range from 1 to n, describe an O(n)-time method for finding the mode, that is, the number that occurs most frequently in A.
-
What is the role of random numbers in a Monte Carlo simulation?
-
Use loops to create a 3 x 5 matrix in which the value of each element is its row number to the power of its column number divided by the sum of its row number and column number. For example, the...
-
Consider an atom diffuses in a 3 D simple cubic lattice by a random walk mechanism. The atom jumps 6 x 1 0 - 5 times per second at 3 0 0 K and 3 x 1 0 4 times per second at 6 0 0 K . Assuming that...
-
Using PivotTables, find the average and standard deviation of sales in the Sales Transactions database. Also, find the average sales by source (Web or e mail). Do you think this information could be...
-
A lottery ticket has a grand prize of $28 million. The probability of winning the grand prize is .000000023. Based on the expected value of the lottery ticket, would you pay $1 for a ticket? Show...
-
Douglas Singletary purchased a mobile home from P&A Investments, Inc. d/b/a Andys Mobile Home and Land Sales. On November 17, 2007, Singletary entered in a sales agreement with Andys to purchase a...
-
Big Sound Inc. manufactures two products: receivers and loudspeakers. The factory overhead incurred is as follows: Indirect labor .............$ 400,400 Subassembly Department ........ 198,800 Final...
-
You have been hired as a data analyst for the company. Adventure Works managers have requested that you analyze 3 years of sales and cost data to help them answer specific business questions. In the...
-
Solutions Plus is an industrial chemicals company that produces specialized cleaning fluids and solvents for a wide variety of applications. Solutions Plus just received an invitation to submit a bid...
-
Assess the requirements of the Sarbanes-Oxley Act related to accounting quality, indicating whether or not you believe the requirements are sufficient to protect stockholders and potential investors....
-
You are a mid level mechanical engineer in 'Slippery When Wet' - a company that develops slides for water parks. Your Engineering Manager wants to purchase a new software tool that will better...
-
Why do individuals fail to benefit from the Karlins time management strategy?
-
Which of the following does not require an adjusting entry at the end of the year? Select one: a. The Accumulated Salary. b. "Cash" invested by the owner. c. The interest accumulated on the loan. d....
-
Why throw ice cream? How does this help Amy's business?
-
Edit question please, I need your take on this; needed some help. Thank you The opposite of me The Paper: Interview the person you chose about your differences with the goal of learning more about...
-
In the following we consider uniform motions in a horizontal surface. To describe them the following coordinate system is chosen: the x-axis is directed to the north an the y-axis to the west. A...
-
How many years will it take a $700 balance to grow into $900 in an account earning 5%?
-
A Northeast Airlines gate agent, Chip Gilliken, gives out seat assignments to ticketed passengers. He takes an average of 50 seconds per passenger and is rated 110% in performance. How long should a...
-
As an approach to inventory management, how does MRP differ from the approach taken in Chapter 12, dealing with economic order quantities (EOQ)?
-
Explain how improving quality cart lead to reduced costs.
-
Which of the following steps in the acquisition of goods and services occurs first? a. Appropriation b. Encumbrance c. Budget d. Expenditure
-
Fixed assets purchased from general fund revenue were received. What account, if any, should have been debited in the general fund? a. None b. Fixed Assets c. Expenditures d. Fund BalanceUnassigned
-
When a governmental units Estimated Revenues Control account is closed out at the end of the fiscal year, the excess of estimated revenues over estimated appropriations is a. Debited to Fund...
Study smarter with the SolutionInn App