Question

In: Computer Science

Perform all of these questions using MATLAB software. 5. The relative error in computation of x-y...

Perform all of these questions using MATLAB software.

5. The relative error in computation of

x-y for = 12.05 and y = 8.02 having absolute errors x=0.005 and y=-0.001.

6. Find the relative error in computation of x-y for x=9.05 and y= 6.56 having absolute errors x = 0.001

and y 0.003 respectively.

7.Find the relative error in computation of x+y for x= 11.75 and y= 7.23 having absolute errors x = 0.002

and y=0.005.

8. If y=4x^6-5x, find the percentage error in y at x=1, if the error is x=0.04.

Solutions

Expert Solution

Q.5:-

x=12.05; % Actual value of x
y=8.02; % Actual value of y
Absx=0.005; % absolute error of x
Absy=0.001; % absolute error of y
Rerx_y=(Absx/x -Absy/y) % final relative error of (x-y) ,we take absolute value thats positive values only



Q.NO 6:-

x=9.05; % Actual value of x
y=6.56; % Actual value of y
Absx=0.001; % absolute error of x
Absy=0.003; % absolute error of y
Rerx_y=(Absy/y-Absx/x)% final relative error of (x-y) ,we take absolute value thats positive values only


Q.NO.7:

x=11.75; % Actual value of x
y=7.23; % Actual value of y
Absx=0.002; % absolute error of x
Absy=0.005; % absolute error of y
Rerxplusy=(Absx+Absy)/(x+y) % final relative error of (x+y)

Q.No.8:-

x=0.04
yerr=4*x^6-5*x
x=1
yact=4*x^6-5*x
Rel_error=(yact-yerr)/yact
Rel_error_perct=Rel_error*100 %percentage error(approx. value)


Related Solutions

Solve this differential equation using Matlab yy' + xy2 =x , with y(0)=5 for x=0 to...
Solve this differential equation using Matlab yy' + xy2 =x , with y(0)=5 for x=0 to 2.5 with a step size 0.25 (a) Analytical (b) Euler (c) Heun d) 4th order R-K method Display all results on the same graph
Using matlab Find x and y that solve the following system: ln(x 2 + y) =...
Using matlab Find x and y that solve the following system: ln(x 2 + y) = 1 − y , xy = − √ x
Find the relative maximum and minimum values. a. f(x,y)=x^3-6xy+y^2+6x+3y-1/5 Relative minimum: ________ at ________ Relative maximum:...
Find the relative maximum and minimum values. a. f(x,y)=x^3-6xy+y^2+6x+3y-1/5 Relative minimum: ________ at ________ Relative maximum: ________ at ________ b. f(x,y)= 3x-6y-x^2-y^2 Relative minimum: ________ at ________ Relative maximum: ________ at ________
Calculate the value of r using the computation formula (6.1) for the following data. X Y...
Calculate the value of r using the computation formula (6.1) for the following data. X Y 2 8 4 6 5 2 3 3 1 4 7 1 2 4 quan stat
Computing3√25 using MATLAB. (a) Beginning with the interval [2,3], and f(x) =x^3−25, use the error bound...
Computing3√25 using MATLAB. (a) Beginning with the interval [2,3], and f(x) =x^3−25, use the error bound for bisection to predict how many iterates bisection would need to get error within 10^−20. (b) Run bisection on this problem. How many iterations did it need? For some of the iterates compute the absolute error. What is happening approximately to the number of significant digits of accuracy with each iteration? (c) Write a program to perform Newton’s method on f(x) =x^3−25 with p0=...
For the arrays x and y given below, use MATLAB to find all the elements in x that are greater than the corresponding elements in y.
For the arrays x and y given below, use MATLAB to find all the elements in x that are greater than the corresponding elements in y.x = [-3, 0, 0, 2, 6, 8] y = [-5, -2, 0, 3, 4, 10]
using matlab, compute and plot y [n] = x [n]* h [n], where a. x [n]...
using matlab, compute and plot y [n] = x [n]* h [n], where a. x [n] = h [n] = a^n (0 <=n <=40) & a = 0.5 b. x [n] = cos [n]; h [n] = u [n]; n = 0:4:360 c. x [n] = sin [n] ; h [n] = a^n; n:4:360; a = 0.9
Perform qualitative risk Analysis using a 5×5 matrix for software development System on 500 medical records...
Perform qualitative risk Analysis using a 5×5 matrix for software development System on 500 medical records for a health clinic Levels of Probability and Impact on Four Specific Objectives Used to Evaluate Individual Risks. Cost Schedule Resources Scope
answer the following questions using rhe x-y data set below: X: 2, 6, 5, 4, 8,...
answer the following questions using rhe x-y data set below: X: 2, 6, 5, 4, 8, 4, 1 Y: 18, 51, 43, 32, 65, 34, 7 use the regression equation to predict a value of y when x=3
Answer All Questions. Show your Computation. Using the midpoint method: Compute the income elasticity of good...
Answer All Questions. Show your Computation. Using the midpoint method: Compute the income elasticity of good Z. State what kind of good Z is (inferior, necessity, or luxury?) Hint: To obtain the effect of Income only, you need to look for where income is changing, but prices of Y and Z are constant. Compute cross-price elasticity of demand for good Z with respect to the price of good Y. State if goods Y and Z are complements or substitutes Hint:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT