Calculate the inverse of a function

Assignment Help MATLAB Programming
Reference no: EM13315761

Solve the linear System Ax =b using Gaussian Elimination.

a) Using matlab write the function [Bag,x] = EG(A,b) to solve the system without pivoting. The solution is the vector x and flag is 0 when the algorithm is completed and 1 otherwise.

b) Run with the following two linear systems:

184_matrix.png

c) Using the tic and toc functions of matlab to estimate the time in the execution of the function of pan (a). Graph n versus time, Using systems of size n = 1000, 2000, 3000 and 4000.

d) Implement the algorithm of the part (a) to calculate the inverse of a function, using a function [B,flagpinverse(A), flag is 0 when is accomplished correctly and 1 otherwise. Run this code for find the inverse of the following matrix:

 

1663_matrix 1.png

e) Now, solve the linear system Ax=b, where A is a Hilbert Matrix using the command hilb(n). Use the function of part (a) to solve this system for n 5,10,15,20 and bell^ is such that the exact solution is the vector xoeRa where all of his components are equal to 1. Show the results in a table using the format long e. Comment your results. Also, the command Mb in Matlab solves the system Ax=b, use this command to solve this to show the difference.

 

 

Reference no: EM13315761

Questions Cloud

Find the focal length of the lens : The size of the virtual image formed by a lens is 2 times the size of the object. Find the focal length of the lens
Write down a mass balance expression for a chemical release : Write down a mass balance expression for a chemical release in a lake given the following: the lake is completely mixed, in-flow and out-flow are equal, degradation of the chemical is occurring through biodegradation (k1) and chemical transformati..
Calculate the image position and height : A 2.0-cm-tall object is 20 cm in front of a converging lens that has a 10 cm focal length. Calculate the image position and height
How can increase the performance of least efficient reactor : There are three reactors degrading a chemical biologically, at three degradation rates; i.e., 0.2 d^-1, 0.4 d^-1, and 1.0 d^-1. The residence time of the chemical in these reactors are 10 d, 5 d, and 55 d, respectively.
Calculate the inverse of a function : Using matlab write the function [Bag,x] = EG(A,b) to solve the system without pivoting. The solution is the vector x and flag is 0 when the algorithm is completed and 1 otherwise.
Which reactor should be preferred for the treatment plant : Chemical ‘A' is regulated by EPA and the maximum allowable concentration in water is 5 ?g/L. Design a reactor for a water treatment plant where 1000 ppm of chemical ‘A' is introduced at a flow rate of 100 m3/min.
Find the rms amplitude of current flowing through circuit : A series RLC circuit has R = 50 %uF057, L = 2.7 %uF06DH, and C = 52 nF. find the rms amplitude of the current flowing through the circuit
Fiscal policy cannot affect output in the long run : "In the Solow model, an economy that starts with a higher stock of capital per capita will reach a higher steady state level of capital per capita"
Calculate the magnetic flux through one turn of the wire : A circular solenoid contains 100 turns of wire and carries a current of 2 amps. Its radius is 1 cm and its length is 10 cm. Calculate the magnetic flux through one turn of the wire

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Kerfuffleboard is a game very much like shuffleboard

Kerfuffleboard is a game very much like Shuffleboard. Players take turns shooting disks at a trianglular scoring area. While the scoring areas are the same in shuffleboard and kerfuffleboard, a disk's contribution to a player's score will be calcu..

  Write a matlab function that takes in one argument

Write a MatLab function that takes in one argument, a vector or 2-D matrix and returns a single value, the highest value in the vector or matrix. Use nested for loops to accomplish this task. Assume that all of the values in the vector or matrix are ..

  Use matlab roots function to obtain the six roots

In the plot, you will see one root is obtained from an initial value that is close to another root. Can you explain by observing the plot why that is happening.

  Simulate rigid body mechanics

Write a MATLAB code to simulate rigid body mechanics. Create a video file of a free falling rod. Neglect effects from drag or loss of kinetic energy. Make sure the rod falls onto one end showing how the rigid body reacts to hitting the ground. Cannot..

  Program should be able to handle collisions

Write a program that, given a list of 5 social security numbers, finds the memory locations assigned by the hashing function h(k) = k mod 55 to store customer records. program should be able to handle collisions.

  The body fat percentage

The body fat percentage (BFP) of a person can be estimated by the formula BFP= 1.2xBMI+0.23xAGE -10.8xGEnder-0.54 where BMI is the body mass index, given by BMI = 703 W/H^2, in which W is the weight in pounds and H is the height in inches

  Compare two sound wave in matlab

Compare two sound wave in matlab as on speech to text processing and open as notepad, calculator,C:,D: and many other on speaking

  Read the file a line at a time

Write the modified text file with the same name as the original file, but preprended with 'new_'. For instance, if the input filename was 'data.txt', the output filename would be 'new_data.txt'.

  Perform gauss-jordan elimination

Write a matlab function to perform gauss-jordan elimination with pivoting. Modify the pivoting so that it is using the row with the highest absolute value rather than the first non-zero row.

  Program that prompts the user to enter grades in a loop

Write a main program that prompts the user to enter grades in a loop, ending on a negative number, stores the grades in a vector, and asks the user for a passing grade. Ten pass the grade vector and passing cutoff to the function and print the per..

  Determine the level of absolute approximate relative error

2006ENG Numerical and Data Analysis. Convert the equation into f(T) = 0 when cp of 1.1kJ/kgK. In our MATLAB program, develop a plot of f(T) versus a range of T = 0 to 1200 K. MATLAB. On the axes, put proper labelling.

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