Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function in Matlab that takes as input the number n, the size of matrices and vectors; m, the number of nonzero elements of

Write a function in Matlab that takes as input the number n, the size of matrices and vectors; m, the number of nonzero elements of a sparse matrix; and the sparse matrix whose nonzeros are given in m-component column vectors r, c, and v: the rk row, ck column entry of the matrix is nonzero with value vk, for k = 1, . . . , m. Finish the program in the following way:

(a) Have the function output the actual n n matrix A represented. Write out or print out your function.

(b) Have the function accept also the input of x, an n-component vector, and, working directly with the r, c, and v, output the matrix-vector multiplication between the sparse matrix and the vector x, and the number of flops involved. Write out or print out your function.

(c) Assuming the sparse matrix is lower triangular and c is in non-decreasing order, have the function accept also the input of b, an n-component vector, and, working directly with the r, c, and v, output column-oriented forward substitution solving for A1 b, and the number of flops involved. Write out or print out your function.

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago