Question
Numerical method

For matlab

For the following equation 20 Marks fx)-1-(5 log1o x)-x2 a. Plot the function graphically from 0 to 2 using fplot. b. Find out the average value of f(x) for x -0 to 8 and display it using fprintf. Show final result with 2 decimal digits. Hint: You have to use a for loop, mean0, log100 functions of Matlab. Vrite a function which returns determinant, transpose and square of a matrix as output. To I file for the matrix given below. 20 Marks 5410 4 6 -4 1 0 1 4 6 Hint: Square of a matrix means AA2 where A is the matrix
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc
clear all
f=@(x) 1-5*log10(x)-x^2;
fplot(f,[0 2])

for i=1:9
    b(i)=f(i-1);
end
Avg=mean(b) % calculating average
fprintf('The average from 0 to 8 is %d\n',Avg);

Answer: The average from 0 to 8 is Inf

Add a comment
Know the answer?
Add Answer to:
Numerical method For matlab For the following equation 20 Marks fx)-1-(5 log1o x)-x2 a. Plot the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • q2 please find x1.x2.x3.x4 using matlab &73 3:45 zain JO 4ll ring Q1 a function with...

    q2 please find x1.x2.x3.x4 using matlab &73 3:45 zain JO 4ll ring Q1 a function with the name "Area Circumference" to calculate the area and circumference tput) of a rectangle. Define the inputs of this function as required. (6marks) rite a manuscript to solve the following system of equations based on [A][x] =[b)]. Find x1, x2, . (5 Marks) 2x1+ x2-3 +2x4 4 x1+5x2-3ax3 +604 -2x1 +5a2-2r3 +6x4= 4 4x1+11x2-4x3+8x4 = 5 Q3: Having f(x) = 3x6-13x2 + 2x, Integratef...

  • Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes co...

    Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...

  • The first two parts should be solved by Matlab. This is from an intro to Numerical...

    The first two parts should be solved by Matlab. This is from an intro to Numerical Analysis Class and I have provided the Alog 3.2 in below. Please write the whole codes for me. Alog3.2 % NEWTONS INTERPOLATORY DIVIDED-DIFFERENCE FORMULA ALGORITHM 3.2 % To obtain the divided-difference coefficients of the % interpolatory polynomial P on the (n+1) distinct numbers x(0), % x(1), ..., x(n) for the function f: % INPUT: numbers x(0), x(1), ..., x(n); values f(x(0)), f(x(1)), % ...,...

  • q3 please using matlab zain Jo. Ø 73 3:45 • nering Q1: a function with the...

    q3 please using matlab zain Jo. Ø 73 3:45 • nering Q1: a function with the name "Area Circumference to calculate the area and circumference tput) of a rectangle. Define the inputs of this function as required. (6marks) Write a manuscript to solve the following system of equations based on (A]x] =[b]. Find x1, x2 4. (5 Marks) 2x1 + x2-03 + 2x4 = 5 4x1 +5x2-3x3 + 6x4 = 9 -2x1 +5x2 - 2.03 + 6x4 = 4 4x1...

  • Question 4 [35 marks in totalj An n x n matrix A is called a stochastic...

    Question 4 [35 marks in totalj An n x n matrix A is called a stochastic matrix if it! satisfies two conditions: (i) all entries of A are non-negative; and (ii) the sum of entries in each column is one. If the (,) entry of A is denoted by any for ij € {1, 2,...,n}, then A is a stochastic matrix when alij 20 for all i and j and I j = 1 for all j. These matrices are...

  • matlab only! Question 1 Plot the following: 0SXS10T, with increments of 0.1 T fx) x2sin(x) Use a green dashed line t...

    matlab only! Question 1 Plot the following: 0SXS10T, with increments of 0.1 T fx) x2sin(x) Use a green dashed line type with square markers. Add x and y axis titles of 'x axis' and 'x2sin(x) Do not add a title to the plot. Question 1 Plot the following: 0SXS10T, with increments of 0.1 T fx) x2sin(x) Use a green dashed line type with square markers. Add x and y axis titles of 'x axis' and 'x2sin(x) Do not add a...

  • Function driver and script file please 4) The polynomial f (x)-0.0074x*-0.284x3+ 3.355x2 12.183x +5 has a...

    Function driver and script file please 4) The polynomial f (x)-0.0074x*-0.284x3+ 3.355x2 12.183x +5 has a real root between 15 and 20. Apply the Newton-Raphson method to this function using an initial guess of xo-16.15. Explain your results. 5) Use the roots MATLAB function to find the roots of the polynomial x x-1-0. Compare your answer to the answer you derived in in question 1. 6) Write the following set of equations below in matrix form. Use MATLAB to solve...

  • Please follow following scripts: Script for part A:Script for Part B: Matlab Exercises 1. Find the...

    Please follow following scripts: Script for part A:Script for Part B: Matlab Exercises 1. Find the determinant (command: det(A)) and the condition number (command: cond(A)) of the Hilbert matrix H of order k (command: hilb(k)), for k = 1,2, ..., 10. Plot the determinant and the condition number as a function of k using a logarithmic scale for the vertical axis. Hint: The template to help you with this homework assignment is homework/hw15.m. 2. Determine if y is in the...

  • Solve the following equations graphically and numerically using roots function on matlab a) x ^ 5...

    Solve the following equations graphically and numerically using roots function on matlab a) x ^ 5 - 3x ^ 3 + 2x ^ 2 - 1 = 0 b) exp(exp(-x)) -5 x^2=0

  • using matlab(applied numerical) 7. (5 points) Create a 4x6 matrix of random integers, each in the...

    using matlab(applied numerical) 7. (5 points) Create a 4x6 matrix of random integers, each in the range from -5 to 5; store it in a variable, ΥΧ. (a) Find the absolute value of rx. (b) Find the smallest and highest numbers in rx. (c) Find the sum of the row and sum of the columns of rx. Hint: use abs, min, max, and sum. 7. (5 points) Create a 4 x 6 matrix of random integers, each in the range...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT