Question

WRITE MATLAB CODE TO SOLVE THIS!! YOU NEED TO DETERMINE TWO POSITIVE ROOTS Determine the two...

WRITE MATLAB CODE TO SOLVE THIS!! YOU NEED TO DETERMINE TWO POSITIVE ROOTS

Determine the two positive roots of f(x) = 7 sin(x)e-x - 1 :

a)Graphically.

b)Using the Newton-Raphson method.

c)Using the secant method.

Initial guesses of x can be decided from the plot and use maximum iterations. Explain your results.

Homework Answers

Answer #1

function y=f(x)

y=7*sin(x)*exp(-x)-1;

end

x=0:0.1:2;

for i=1:21

y=f(x(i));

end

plot(x,y)

2.

3.

Know the answer?
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
Similar Questions
WRITE MATLAB CODE TO SOLVE THIS!! YOU NEED TO DETERMINE TWO POSITIVE ROOTS Determine the two...
WRITE MATLAB CODE TO SOLVE THIS!! YOU NEED TO DETERMINE TWO POSITIVE ROOTS Determine the two positive roots of f(x) = 7 sin(x)e-x - 1 : a)Graphically. b)Using the Newton-Raphson method. c)Using the secant method. Initial guesses of x can be decided from the plot and use maximum iterations. Explain your results.
Only MATLAB code is required. No handwritten solution is requested. Use the Newton-Raphson method to determine...
Only MATLAB code is required. No handwritten solution is requested. Use the Newton-Raphson method to determine a root of f (x) =− 0.9x2 + 1.7x + 2.5 using x0 = 5 . Perform the computation until ε a is less 0.01%. Verify the results with the plot. ( 25 pts. )
C++ Programming Determine the roots of the function with errors of less than 0.1% for x...
C++ Programming Determine the roots of the function with errors of less than 0.1% for x values between -5 and 5. you MUST NOT utilize the "if" statement in your code. Use the Newton-Raphson method. f(x) = sin(x)
Determine one of the roots of the non linear equation f (x) = 2x3 - x2...
Determine one of the roots of the non linear equation f (x) = 2x3 - x2 -1 using Newton Raphson Method. If known the initial value x = -3 and accuracy to 3 decimal places!
I need MATLAB code no handwritten solution required. Write a MATLAB script to solve the following...
I need MATLAB code no handwritten solution required. Write a MATLAB script to solve the following equations using the Cramer’s rule, and compare your results with MATLAB’s root finding method ( 25 pts. ). 8x1 − 2x2 − 1x3 = 5 − 2x1 + 9x2 − 4x3 − x4 = 2 − x1 − 3x2 + 7x3 − x4 − 2x5 = 1 − 4x2 − 2x3 + 12x4 − 5x5 = 1 − 7x3 − 3x4 − 15x5 =...
Determina las raíces reales de f(x) = -0.4x2 + 2.2x + 4.7. Utiliza los valores iniciales...
Determina las raíces reales de f(x) = -0.4x2 + 2.2x + 4.7. Utiliza los valores iniciales de x=0 y x=8. a) Gráficamente b) Por medio de la fórmula general c) Utiliza el método de bisección con tres iteraciones para determinar la raíz más grande. Calcula los errores. d) Utiliza el método de la secante con tres iteraciones para determinar la raíz más grande. Calcula los errores. e) Utiliza el método de Newton-Raphson con tres iteraciones para determinar la raíz más...
USING MATLAB Write a program called QuadProg that determines the roots of a quadratic equation. Use...
USING MATLAB Write a program called QuadProg that determines the roots of a quadratic equation. Use functions to implement each action. Zip you directory of *.m files into a single file and turn this in on BBLearn under Class Activities. QuadProg write a function called getInputs to get a single input value. write a function called findDiscriminant write a function called findDenominator write a function called findRoot which will be used for both roots write a function called displayResults displayResults...
Solve the following problem using the MATLAB environment Write a function [approx_root, num_its] = bisection(f,a,b,tol) that...
Solve the following problem using the MATLAB environment Write a function [approx_root, num_its] = bisection(f,a,b,tol) that implements the bisection method. You function should take as input 4 arguments with the last argument being optional, i.e, if the user does not provide the accuracy tol use a default of 1.0e-6 (use varargin to attain this). Your function should output the approximate root, approx_root and the number of iterations it took to attain the root, num_its. However, if the user calls the...
Hi, I have this task about convolution and I need to write it as a code...
Hi, I have this task about convolution and I need to write it as a code in matlab. I have input signal x[n]=0.3 ∗ sin(n/5) + sin(n/50) : a) Create your own delta signal h[m] that removes the higher frequency sinusoidal component to get yl[n]. b) Subtract the yl[n] from the original signal(x[n]) and get the higher frequency component yh[n] (pay attention to array sizes and phase shift) . c) Plot x[n], yl[n] and yh[n] on the same graph
Problem 3 you can use Matlab and also i give u the Problem 1 code its...
Problem 3 you can use Matlab and also i give u the Problem 1 code its on Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandpass filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce this is the Problem 1 code and the solutin clear; clc;...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT