HW2-1. Write an M-file to make the following four variables. 212 *** (c) C = (a)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
HW2-1. Write an M-file to make the following four variables. 212 *** (c) C = (a) A = is a 6x6 matrix full of 2's (use ones or zeros). 100 020 (b) B= 0 0 3 000 2-2 12 11 12 B E [91 92 www *** *** ... www *** 0 0 0 is a 9x9 matrix of all zeros, but with the values [1 2 3 4 5 4 3 2 1] on the main diagonal (use diag). : 10 20 is a 10x10 matrix where the vector 1:100 runs down the rows (use reshape). 1 100 (d) Make D be a 3x5 matrix of random integers with values on the range -10 to 0 (use rand and floor or ceil or fix). zinput your answer here for HW2-1 HW2-2. Using left division operator (\) to solve curve fitting problem. (a) Find the least squares parabola f(x) = ax²³ + bx² + cx+d for the set of data X₂ Ук -2 -9.8 (b) Compare your results (a,b,c,d) with the results returned by builtin function p-polyfit(x,y,3). (c) Plot the sample data points with blue circle marker and the fitting curve. -1 -8.8 0 -6.3 1 2 -5.8 3.2 HW2-1. Write an M-file to make the following four variables. 212 *** (c) C = (a) A = is a 6x6 matrix full of 2's (use ones or zeros). 100 020 (b) B= 0 0 3 000 2-2 12 11 12 B E [91 92 www *** *** ... www *** 0 0 0 is a 9x9 matrix of all zeros, but with the values [1 2 3 4 5 4 3 2 1] on the main diagonal (use diag). : 10 20 is a 10x10 matrix where the vector 1:100 runs down the rows (use reshape). 1 100 (d) Make D be a 3x5 matrix of random integers with values on the range -10 to 0 (use rand and floor or ceil or fix). zinput your answer here for HW2-1 HW2-2. Using left division operator (\) to solve curve fitting problem. (a) Find the least squares parabola f(x) = ax²³ + bx² + cx+d for the set of data X₂ Ук -2 -9.8 (b) Compare your results (a,b,c,d) with the results returned by builtin function p-polyfit(x,y,3). (c) Plot the sample data points with blue circle marker and the fitting curve. -1 -8.8 0 -6.3 1 2 -5.8 3.2
Expert Answer:
Related Book For
Posted Date:
Students also viewed these accounting questions
-
A business student was heard to make the following remark: With the advent of credit cards and the existence of factor businesses, it now possible for business entities to offer extensive credit...
-
The dietitian wants your department to make the following recipe for lunch service in the Assisted Living Facility in which you work, where there are 125 residents. For this exercise, we will not...
-
Fill in the blanks to make the following statements correct. a. Suppose you earn an annual income of $22 500 and you paid a total of $3600 in taxes. Your aver- age tax rate is _______. b. Suppose you...
-
What is the future value of the following cash flows, given an appropriate discount rate of 7.74% (to the nearest penny)? Year 1 Year 2 Year 3 Year 4 Year 5 $2,005 $4,054 $6,159 $8,532 $11,985
-
During 2014, Ortega Corporation had net income of $82,000. Included on its income statement were depreciation expense of $4,600 and amortization expense of $600. During the year, Accounts Receivable...
-
Suppose that F: R R has a second symmetric derivative at some x0. Prove that if F(x0) is a local maximum, then D2F(x0) < 0, and if F(x0) is a local minimum, then D2F(x0) > 0.
-
Is the chi-square test appropriate? c. Compute the value of X2. d. How many degrees of freedom are there? e. Find the level = 0.05 critical value. f. Do you reject H0 at the 0.05 level? g. Find the...
-
HJ. Heinz Company uses standards to control its materials costs. Assume that a batch of ketchup (1,500 pounds) has the following standards: The actual materials in a batch may vary from the standard...
-
Jos Ruiz starts a company that makes handcrafted birdhouses Competitors sell a similar birdhouse for $240 each. Jose believes he can produce a birdhouse for a total cost of $205 per unit, and he...
-
18. Add the Office field to the Filters area of the Pivot Table. Filter the table so that only organizations with private offices are visible.
-
On September 5, Grossman opened a checking account and negotiated a short-term line of credit of up to $10,900,000 at 10% interest. The company is not required to pay any commitment fees. Note: Enter...
-
The med-Surg/ Tele nurse is caring for a 50-year-old male with adiagnosis of a first-degree block. What does the nurse expect to see on the 6-second ECG stripin reference to the PR interval?
-
Let's consider the problem of finding the minimum of with a gradient search. f(x) = 3x+x-4 old (a) Pick a starting point of x = 1 and a learning rate of n = 0.05, please show how to use the...
-
Milano Pizza has a small area for in - store dining as well as offers take - out and free home delivery services. The pizzeria s owner determined the shop has two major cost drivers the number of...
-
Being 65 the ascii code of 'A' (capital letter a) and using the following pseudocode to get the hashValue. int hashValue = 0; for (int i = 0; i < 3; i++) { } hashValue += myString[i] 'A'; for (int...
-
Have a table that will show the equivalent effective interest rates to some nominal interest rates with various compounding rates. Put the nominal interest rates of 2%, 3%, 4%, 5%, 6%, 7%, 8%, 9%,...
-
Giulia has just commenced her first professional full-time job in Australia and is looking to save a deposit to purchase a property. She gets paid monthly and is looking to save some of her salary in...
-
Consider a closed, rigid tank with a volume of 0.8L, filled with cold water initially at 27C. The tank is filled such that there are no voids (air pockets) within. The initial pressure within the...
-
Evaluate the following expressions without using MATLAB. Check the answers with MATLAB. (a) -3&3 (b) 5 <4&0>-3 (c) -2&2>318/3 (d) -3
-
Create a 4 4 matrix A having random integer values between 1 and 10. Call the matrix A and, using MATLAB, perform the following operations. For each part explain the operation. (a) A* A (b) A.*A (c)...
-
An isolated prime is a prime number p such that neither p - 2 nor p + 2 is prime. For example, 47 is an isolated prime since 45 and 49 are both not primes. Write a computer program that finds all the...
-
Recording effects of transactions in T-accounts Record the transactions below for Amena Company by recording debit and credit amounts directly in the following T-accounts: Cash; Accounts Receivable;...
-
Identifying type and normal balances of accounts For each of the following (1) identify the type of account as an asset, liability, equity, revenue, or expense, (2) enter debit (Dr.) or credit (Cr.)...
-
Preparing a trial balance After recording the transactions of Exercise 3-2 in T-accounts and calculating the ending balance of each account, prepare a trial balance. Use May 31, 2008, as its report...
Study smarter with the SolutionInn App