Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribedSolve 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 year

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

3. Existing organizations and programs constrain behavior.

Answered: 1 week ago