Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve this omework 8.5.1.1. When using iterative methods, the matrices are typically ery sparse. The question then is how to store a sparse matrix and

Solve thisimage text in transcribed

omework 8.5.1.1. When using iterative methods, the matrices are typically ery sparse. The question then is how to store a sparse matrix and how to erform a matrix-vector multiplication with it. One popular way is known as ompressed row storage that involves three arrays: - 1D array nzA (nonzero A) which stores the nonzero elements of matrix A. In this array, first all nonzero elements of the first row are stored, then the second row, etc. It has size (number of nonzeroes). - 1D array which is an integer array of size n+1 such that equals the index in array nzA where the first element of the first row is stored. then gives the index where the first element of the second row is stored, and so forth. equals Having this entry is convenient when you implement a matrix-vector multiplication with array - 1D array of size which holds the column indices of the corresponding elements in array 1. Write a function [nzA,ir,ic]= Create_Poisson_problem_nzA (N) that creates the matrix A in this sparse format. 2. Write a function y= SparsemvMult ( nzA, ir, ic, x) that computes y=Ax with the matrix A stored in the sparse format

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_2

Step: 3

blur-text-image_3

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

Compute the derivative f(x)=(x-a)(x-b)

Answered: 1 week ago