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

  What is the end of project cash flow

A firm believes it can generate an additional $250,000 per year in revenues for the next 5 years if it replaces existing equipment with new equipment that costs $210,000.

  Materials and labor variances

Last year Vera Corporation budgeted for production and sales of 20,000 cloth handbags. Vera produced and sold 19,250 handbags. Each handbag has a standard requiring 4 feet of material at a budgeted cost of $2.50 per foot and 45 minutes of sewing t..

  Pepare the current and long-term liability sections of the

camden biotechnology began operations in september 2013. the following selected transactions relate to liabilities of

  Abis corporation uses the weighted-average method in its

abis corporation uses the weighted-average method in its process-costing system. this month the beginning inventory in

  Geh is in the business of owning and running hotels

GEH is in the business of owning and running hotels with an 'eco' theme - meaning they must be environmentally and socially responsible, but capable of making a good profit in the medium to long term.

  Alder company budgets on an annual basis the following

alder company budgets on an annual basis. the following beginning and ending inventory levels in units are planned for

  Compute the expected balance in accounts

Sugarland Company sells a single product and anticipates opening a new facility inCharlotteon May 1 of the current year.

  A thin metal disk of mass m200 x 10-3 kg and radius r220cm

a thin metal disk of mass m2.00 x 10-3 kg and radius r2.20cm is attached at its center to a long fiber. when the disk

  The real risk-free rate is 3 and inflation is expected to

the real risk-free rate is 3 and inflation is expected to be 3 for the next 2 years. a 2-year treasury security yields

  Viking uses process costing all manufacturing costs

viking beer is a microbrewery that produces one type of beer. the production level is 18000 gallons per month which is

  Describe the knowledge used to develop a knowledgeable

understanding the entity and its environment you have just been assigned as in-charge accountant on hipstar inc. a new

  Balance in eve prepaid insurance

Eve's Apples opened business on January 1, 2010, and paid for two insurance policies effective that date. The liability policy was $36,000 for eighteen-months, and the crop damage policy was $12,000 for a two-year term. What was the balance in Eve..

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