Times Table A time table gives the product between two integers, for example, 5 times 5...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Times Table A time table gives the product between two integers, for example, 5 times 5 is 25, 5 times 6 is 30, 12 times 12, etc. Write a function timesTable that outputs a times tables up to the size requested given by a positive integer sizeofTable. The top row and left column have integers from 1 to the desired size. For example >> outputMatrix = timesTable(5) outputMatrix = 1 2 3 If sizeOfTable is: 4 5 6 7 8 9 10 11 12 end 2 3 4 3 4 5 13 14 2 4 6 8 10 M6925 negative the absolute value of the value in size OfTable should be used to calculate the table. ■ is not an integer, the table should be calculated to the nearest integer greater than or equal by size OfTable. Restriction: The timesTable function can only use while loops. 3 Your Function 1 function outputMatrix = timesTable( sizeofTable) 2 11 12 15 +00 4 8 12 16 20 5 10 15 20 25 % Insert code to determine the size of the times table Save C Reset % Insert code to initialize the table by filling all entries with zeros % Insert code to fill the first column and first row with consecutuve integers % starting with 1 % Use a loop structure to fill the remaining entries in the times table MATLAB Documentation Trouble with lah? 111 4 Times Table A time table gives the product between two integers, for example, 5 times 5 is 25, 5 times 6 is 30, 12 times 12, etc. Write a function timesTable that outputs a times tables up to the size requested given by a positive integer sizeofTable. The top row and left column have integers from 1 to the desired size. For example >> outputMatrix = timesTable(5) outputMatrix = 1 2 3 If sizeOfTable is: 4 5 6 7 8 9 10 11 12 end 2 3 4 3 4 5 13 14 2 4 6 8 10 M6925 negative the absolute value of the value in size OfTable should be used to calculate the table. ■ is not an integer, the table should be calculated to the nearest integer greater than or equal by size OfTable. Restriction: The timesTable function can only use while loops. 3 Your Function 1 function outputMatrix = timesTable( sizeofTable) 2 11 12 15 +00 4 8 12 16 20 5 10 15 20 25 % Insert code to determine the size of the times table Save C Reset % Insert code to initialize the table by filling all entries with zeros % Insert code to fill the first column and first row with consecutuve integers % starting with 1 % Use a loop structure to fill the remaining entries in the times table MATLAB Documentation Trouble with lah? 111 4
Expert Answer:
Answer rating: 100% (QA)
function outputMatrix timesTablesizeOfTable This function produces a times table of any give... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these electrical engineering questions
-
Redo Problem 11 using MATLAB in the following way: a. MATLAB will generate the root locus for the uncompensated system along with the 0.8 damping ratio line. You will interactively select the...
-
Redo Problem 19 using a lag-lead compensator and MATLAB in the following way: a. MATLAB will generate the root locus for the uncompensated system along with the 0.5 damping-ratio line. You will...
-
Redo Problem 6 using MATLAB in the following way: a. MATLAB will generate the root locus for the uncompensated system along with the 0.707 damping ratio line. You will interactively select the...
-
Comment on the following statement: A financial projection presents an organizations expected results, given a hypothetical assumption.
-
An American business pays $20,000, $5,000, and $15,000 to suppliers in Japan, Switzerland, and Canada, respectively. How much, in local currencies, do the suppliers receive? Selling quotes for...
-
A clock face has negative point charges q, 2q, 3q, . . , 12q fixed at the positions of the corresponding numerals the clock hands do not perturb the net field due to the point charges. At what...
-
Almetals, Inc., a Michigan company, entered into a contract with the German firm Wickeder Westfalenstahl regarding the purchase of clad metal, a specialty metal used in a variety of industries but...
-
The ending general ledger balance of $186,000 in notes payable for the Sterling Manufacturing Company is made up of 20 notes to eight different payees. The notes vary in duration anywhere from 30...
-
You would like your retirement fund to have 450,000$ after 32 years. The bank offers you an APR of 2.6%, compounded quarterly. How much should your quarterly deposits be in order to reach that goal?...
-
Occupy Mall Street Occupy Mall Street (OMS or the Company) is a leading real estate management firm that owns and manages over 100 shopping malls across the United States. The Company went public in...
-
In the context of using information technologies for a competitive advantage, a top - line strategy focuses on: Group of answer choices helping different market segments achieve technological...
-
After having inspected the regression of Sales (in $1000) on Price (in $) reported in the text, the product manager makes the following observation: "The stores that lower the price of Slippery Soap...
-
Hairdressing is an industry that is significantly all about making people look and feel great. In the past, the hairdressing industry focused its services on females, with male clients opting for...
-
1. Select an item or industry of your preference and answer the following questions by doing the analysis for that same item: Who will be the consumers that belong to the potential market? (Provide...
-
It is often said that public service employees are unmotivated to perform their duties. They are just interested in job security and the retirement benefits. The Honolulu Police Department is plagued...
-
Federal law outlawing a combination of interests such as a trust or a conspiracy that attempts to unreasonably constrain trade among states or with foreign nations. Significance: The Supreme Court,...
-
Brightside Communications is evaluating a 5-year project that requires the purchase of a new machine costing $200,000. The machine will be depreciated on a straight-line basis over the life of the...
-
The power company must generate 100 kW in order to supply an industrial load with 94 kW through a transmission line with 0.09 resistance. If the load power factor is 0.83 lagging, find the...
-
On February 2, 2012, Alexandra purchases a personal computer for her home. The computer cost $3,000. Alexandra uses the computer 80 percent of the time in her accounting business, 10 percent of the...
-
Tom has a successful business with $100,000 of income in 2012. He purchases one new asset in 2012, a new machine which is 7-year MACRS property and costs $25,000. If you are Tom's tax advisor, how...
-
Diego, age 28, married Dolores, age 27, in 2012. Their salaries for the year amounted to $46,479 and they had interest income of $3,500. Diego and Dolores' deductions for adjusted gross income...
-
Prove the second part of Theorem 3.8. That is let \(\left\{X_{n}ight\}_{n=1}^{\infty}\) be a sequence of random variables, \(X\) be a random variable, and \(g\) be a Borel function on \(\mathbb{R}\)....
-
Prove the first part of Theorem 3.7. That is let \(\left\{X_{n}ight\}_{n=1}^{\infty}\) be a sequence of random variables, \(c\) be a real constant, and \(g\) be a Borel function on \(\mathbb{R}\)...
-
Let \(\left\{X_{n}ight\}_{n=1}^{\infty},\left\{Y_{n}ight\}_{n=1}^{\infty}\), and \(\left\{Z_{n}ight\}_{n=1}^{\infty}\) be independent sequences of random variables that converge in probability to the...
Study smarter with the SolutionInn App