Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Solve the questions using Octave/Matlab Write a function file that takes as input a matrix A_ and tests whether or not the matrix is (a)
Solve the questions using Octave/Matlab
Write a function file that takes as input a matrix A_ and tests whether or not the matrix is (a) square, and (b) diagonally dominant, reporting the answers on the screen. Show that your code is correct by testing it for the matrix in question 2, as well as for cases where the matrix is not diagonally dominant, and not square. Define the100 times 100 square matrix and the column vector b by A_ij = I_ij + 1/(i-j)^+1, b_i = 1 + 2/i, 1 lessthanorequalto i, j lessthanorequalto 100 were I_ij is the 100 times 100 identity matrix (ie. 1 on the main diagonal and 0 everywhere else). Solve Ax = b for x using both the Gauss-Seidel method and the A\b construct. Do not give the whole vector x in your output, but only x_2 x_50 and x_gg. The Hilbert matrix is a square n times n matrix defined by H^n_ij = 1/i+j-1. Define b^n to be a column vector of dimension n, and with each element 1. Construct b^n and, then solve for x^n, H^nx^n = b^n, in the cases n = 10, 15, 20 and 30. Comment on the results. The sales figures for a business are as follows for the first six months of the year: R40 000, R44 000, R52 000, R64 000, R80 000, R84 000. The owner believes that the sales curve can be approximated by a quadratic function. Find the best quadratic fit to the data, and use it to estimate the projected sales for the rest of the yearStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started