Write a script ?le that evaluates the product of the ?rst

Assignment Help Accounting Basics
Reference no: EM13844458

EXERCISE 1

Enter the following matrices and vectors in MATLAB

(a)Perform the following operations: AB, BA, cB and Ad (use standard linear algebra multiplica- tion).

(b) Construct a 3 × 6 matrix C = [A B ] and a 4 × 3 matrix D = [B].c
(c) Use the "backslash" command to solve the system Ax = b.
(d) Replace A(2; 3) with 0.
(e) Extract the 3rd row of the matrix A.
(f) A row or a column of a matrix can be deleted by assigning the empty vector [] to the row or the column. For instance A(2,:)=[] deletes the second row of the matrix A.

Delete the third row of the matrix B.

EXERCISE 2

Recall that a geometric sum is a sum of the form a + ar + ar2 + ar3 + : : :.

(a)Write a function ?le that accepts the values of r, a and n as arguments and uses a for loop to return the sum of the ?rst n terms of the geometric series. Test your function for a = 3, r = 1=2 and n = 10.

(b)Write a function ?le that accepts the values of r, a and n as arguments and uses the built in command sum to ?nd the sum of the ?rst n terms of the geometric series. Test your function for a = 3, r = 1=2 and n = 10.

Hint: Start by de?ning the vector e=0:n-1 and then evaluate the vector R = r.^e. It should be easy to ?gure out how to ?nd the sum from there.

EXERCISE 3

The counter in a for or while loop can be given explicit increment: for i =m:k:n to advance the counter i by k each time. In this problem we will evaluate the product of the ?rst 10 odd numbers 1 · 3 · 5 · : : : · 19 in two ways:

(a) Write a script ?le that evaluates the product of the ?rst 10 odd numbers using a for loop.

(b) Evaluate the product of the ?rst 10 odd numbers using a single MATLAB command. Use the MATLAB command prod.

EXERCISE 4

Write a script ?le that creates a row vector v containing all the powers of 2 below 1000. The output vector should have the form: v = [ 2; 4; 8; 16 : : : ]. Use a while loop.

EXERCISE 5

Write a function ?le that creates the following piecewise function:

Assume x is a scalar. The function ?le should contain an if statement to distinguish between the di?erent cases. The function should also display "the function is undefined at x = 10" if the input is x = 10. Test your function by evaluating f(1), f(4), f(7) and f(10).

Reference no: EM13844458

Questions Cloud

Examine the harvard diamond foods fraud case : Examine the Harvard Diamond Foods fraud case located in your Syllabus course materials. What are some examples of the 6 anomalies of fraud indicators that you can find in Diamond Foods' operating procedures and company personnel
Construct a scatterplot of relationship between variables : Construct a scatterplot of the relationship between the 2 variables. Plot the regression line on this graph
Data warehouse design : Data WareHouse Design
Explain the concept of dma with cpu overhead : Explain the concept of DMA with CPU overhead
Write a script ?le that evaluates the product of the ?rst : Write a script ?le that evaluates the product of the ?rst 10 odd numbers using a for loop. Evaluate the product of the ?rst 10 odd numbers using a single MATLAB command. Use the MATLAB command prod.
Distinguish between an incremental and a differential cost : "Accountants do not ordinarily record opportunity costs in the formal accounting records." Why? Illustrate your explanation with examples. Distinguish between an incremental cost and a differential cost.
What is the advantage of the contribution approach : What is the advantage of the contribution approach as compared with the absorption approach? "Basing pricing on only the variable costs of a job results in suicidal under-pricing." Critically evaluate this statement.
Discuss some of the steps the aicpa : Discuss some of the steps the AICPA and the accounting profession as a whole can and are taking to reduce practitioners' exposure to lawsuits. You answer should provide at least five steps. Discuss the four primary purposes of analytical procedures..
How many customers do mcdonalds have each year : How many customers do McDonald's have each year? What are the total assets for 2014? Find the Balance Sheet and identify the amounts and explain

Reviews

Write a Review

Accounting Basics Questions & Answers

  How much control does fed have over this longer real rate

Hubbard argues that the Fed can control the Fed funds rate, but the interest rate that is important for the economy is a longer-term real rate of interest.   How much control does the Fed have over this longer real rate?

  Coures:- fundamental accounting principles

Coures:- Fundamental Accounting Principles: - Explain the goals and uses of special journals.

  Accounting problems

Accounting problems,  Draw a detailed timeline incorporating the dividends, calculate    the exact Payback Period  b)   the discounted Payback Period. the IRR,  the NPV, the Profitability Index.

  Write a report on internal controls

Write a report on Internal Controls

  Prepare the bank reconciliation for company

Prepare the bank reconciliation for company.

  Cost-benefit analysis

Create a cost-benefit analysis to evaluate the project

  Theory of interest

Theory of Interest: NPV, IRR, Nominal and Real, Amortization, Sinking Fund, TWRR, DWRR

  Liquidity and profitability

Distinguish between liquidity and profitability.

  What is the expected risk premium on the portfolio

Your Corp, Inc. has a corporate tax rate of 35%. Please calculate their after tax cost of debt expressed as a percentage. Your Corp, Inc. has several outstanding bond issues all of which require semiannual interest payments.

  Simple interest and compound interest

Simple Interest, Compound interest, discount rate, force of interest, AV, PV

  Capm and venture capital

CAPM and Venture Capital

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