Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A symmetric tridiagonal matrix A can have nonzero values at only diagonal elements and elements just below or above diagonal elements. Also A ^ T

A symmetric tridiagonal matrix A can have nonzero values at only diagonal elements and elements just below or above diagonal elements. Also A^T=A due to the symmetry. For example,
A=((2100@1210@0121@0012))
is an n by n symmetric tridiagonal matrix with n=4, the diagonal elements d=2, and the non-diagonal elements a=1.
Write a MATLAB function A=symTri(n,d,a) to return such an n by n matrix A with the same diagonal values d and nondiagonal values a.
Use no special built-in functions.
Make an empty matrix A first. All the elements are zeros right after its creation.
For efficiency, your program should update the necessary elements only, i.e., do not rewrite a zero into another zero.
Include your .m script file in the zip file.
What is the asymptotic running time of your algorithm? Your answer should be O(f(n)) for a simple function f(n) of n. Briefly justify your answer regarding a substitution A_(i,j)x as one floating point operation A_(i,j)0+x.

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

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago