Write a function in matlab that takes as input the number n

Assignment Help Computer Engineering
Reference no: EM132199128

Question :

Write a function in Matlab that takes as input the number n, a sparse matrix given as r, c, v, m, an n-component column vector b, and a tolerance tol.

Directly use this coordinate list form to output the approximate solution of Jacobi method solving Ax = b using the zero vector for initial guess and iterated until the 2-norm (do not use Matlab's ‘norm' command) of the residual falls below tol (while loop); the number of iterations used; the number of flops used for calculating the approximation; and the 2-norm of the final residual vector.

(a) Write out or print out your function.

(b) Create the r, c, v, m for the 10×10 tridiagonal matrix with 2's down the main diagonal and -1's in the upper and lower diagonals. Take b the vector of 1's and tol = 10-4 and write down your results for the number of iterations, the 2-norm of the residual vector, and the number of flops used. What about for tol = 10-8.

Reference no: EM132199128

Questions Cloud

Write out or print out your function : Write a function in Matlab that takes as input s and a number x and outputs the floating point number of x using s-digit rounding.
Write a function in matlab that takes as input the number n : 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;
Calculate the gross pay for each employee : ACC508 Informatics and Financial Applications Assignment Task, University of the Sunshine Coast, Australia. Calculate the gross pay for each employee
Test your function with three different integer arrays : Write a function, named avg, that receives an array of integer values and returns the average of those values in that array.
Write a function in matlab that takes as input the number n : Write a function in Matlab that takes as input the number n, a sparse matrix given as r, c, v, m, an n-component column vector b, and a tolerance tol.
Write a function to remove duplicate entries in linked list : Write a function to remove duplicate entries in a linked list. For example, given the list (5,2,2,5,3,9,2) as input, your function should change the list.
How often the police should monitor the tickets : For the NJ Light Rail problem, assume the price of a ticket is $5.00, and that a passenger has to decide whether to buy a ticket or try to get a free ride.
Discuss the macroeconomic impacts of slow wage growth : Wage growth has slowed considerably in many advanced economies since the Global Financial Crisis. Compare and contrast, and explain, the likely causes.
What are some arguments for inflation targeting like given : Some observers argue that the mandate of the Federal Reserve Bank should be changed to prioritize the control of inflation over other goals.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Compute the standard deviation at each day

Compute the 20 days moving average: avg(n) = avg(n-1)*factor + close of today*(1-factor). Compute the standard deviation at each day.

  What is an entity relationship diagram

What is an Entity Relationship Diagram. In your answer please describe the terms Entity, Attribute

  How can quicksort be altered so that it can be applied

How can quicksort be altered so that it can be applied on a doubly-linked list?

  How defense-in-depth and awareness complimentary techniques

Your final research paper assignment is to write a research paper that explains how defense-in-depth (chapter 6) and awareness (chapter 10) are complimentary.

  Display all of the purchases to the customer

Display all of the purchases to the customer with the original price and the discount price.

  Scripting computer languages and compiled computer language

What is the difference between scripting computer languages and compiled computer language?

  Give most popular ways today to code a database application

Embedded SQL applications tend to lack interoperatiliby. Applications might have to modified to work with other RDBMS ODBC applications do not need the explicit declaration and use of host variables.

  Find the minimum number of multiplexer and gates

find the minimum number of multiplexer and gates to realize the given function.

  Find out the level and commission using the table

Write down a c++ program that accepts the name and sales of a salesperson. Using IF statement, determine the level and commission using the table.

  What is the most effective advertising strategy

The advertising agency promoting a new product is hoping to get the best possible. Given these constraints, what is the most effective advertising strategy?

  Define the given term and describe relevance

Define the term and describe its relevance and usage in maintaining security in a web application portal. Describe the term and explain how access control.

  Why might an internet service not want you to use modem

Why would you want to use the newer V.92 modem rather than the older V.90? Why might an online Internet service not want you to use the V.92 modem?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd