`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
This is happening because when matlab is trying to evaluate the 5+exp(x) as a part of calculation it identifies it as beyond calculation for x=720 but exp(-720) is a number which can be calculated by matlab.So, function gives inf. But, when x=750 both becomes inf and 0. So, inf*0 became an NaN.
So, to have it corrected. h(x) is (5+exp(x))*(exp(-3*x)+exp(-x))
So, expand it, h(x)=5*exp(-x) + exp(-2*x) + 5*exp(-3*x) + 1
So, now below matlab program will run fine
clc
clear all
x=[1,10,100,400,720,750];
h=@(x) 5*exp(-x) + exp(-2*x) + 5*exp(-3*x) + 1;
[x' h(x')]

Kindly revert for any queries
Thanks.
(b) We need to evaluate the function A(x)=[5+e* |e"*" +e*| for very large values of x....
Q1 2016
a) We want to develop a method for calculating the function f(x)
= sin(t)/t
dt
for small or moderately small values of x. this is a special
function called the sine integral, and it is related to another
special function called the exponential integral. it rises in
diffraction problems.
Derive a Taylor-series expression for f(x), and give an upper
bound for the error when the series is terminated after the n-th
order term. sint = see image
b)we...
1. (a) We need to calculate accurate values of the function for very large values of x. However, it is found that just programming this formula into a computer gives very poor accuracy for large x Explain why this happens, and show how to re-write the function so that it can be used reliably, even when x is large. [6 points] (b) In diffraction theory, it is sometimes necessary to evaluate the function sin θ f(x) for small to moderate...
-100x 1. Given the function f(x)=- (1-0.5x) (a) Find the y-intercept point (if there is any): (b) Find the x-intercept point(s) (if there is any): (c) Find f'(x): (d) Find critical number(s) of f(x) (Type 1 and Type 2, if there are any): (e) Find the critical point(s) (if there are any): (f) Find the open x-intervals where f(x) increases and decreases: (g) Find the behavior of the function for very large positive x-values (find limit as x goes to...
7. -13 points GHColAlg11 3.3.060 Evaluate the function at the indicated x-values. f(x)=[7x] (a) (b) (c) f(2)= r-6)= f(-3.6) = Need Help? Read It Talk to a Tutor
for part (b) I need to copy MATLAB code..
ex-1 Consider the function f(x) (a) Use the decimal format with five significant digits (apply rounding) to calculate (using a calculator) fix) for x = 0.005 (b) Use MATLAB (format long to calculate the value of x). Consider this to be the true value, and calculate the true relative error due to rounding in the value of x that was obtained in part (a).
1. (25 pts) Let f(x) be a continuous function and suppose we are already given the Matlab function "f.", with header "function y fx)", that returns values of f(x) Given the following header for a Matlab function: function [pN] falseposition(c,d,N) complete the function so that it outputs the approximation pN, of the method of false position, using initial guesses po c,pd. You may assume c<d and f(x) has different signs at c and d, however, make sure your program uses...
matlab only
Question 5: a.) Write an m-file using conditional statements to evaluate the following function, assuming that the scalar variable x has a value. The function is for x <-1 - 3e y=2+cos(m) for-1 x<5 y 10-5)+1 for r 2 5 Use your file to evaluate y for x5, x-3, and x-15, and Use keyboard entry for values of x. b.) Use a for loop in the above file to plot the above function over the interval -2x <10....
i need Matlab code asap
Write a program that evaluates the function f(x) = tan’x + x - 2 between -27 and 27 in steps of 1/10 and plots the results. Create a function handle for your function, and use function feval to evaluate your function at the specified points. 2. Write a program that locates the zeros of the function f(x) = cos éx -0.25 between 0 and 27. Use the function fzero to actually locate the zeros of...
We are the four computed values
of f, IEEE floating point arithmetic is used? You can assume that
exp(x) and exp(-x) are calculated exactly and rounded to the
nearest floating point number
The following lines of MATLAB code evaluate the function 1.5 1016 in four different ways (a) x=1.5e-16; f=0.5*((exp (x)-exp (-x))/x) (b) x -1.5e-16; f - 0.5*((exp(x)-exp(x))/((xt1)-1)) (c) x - 1.5e-16; 0.5* ((exp(x) -exp(-x))/((x-1)+1)) (d) x - 1.5e-16; fexp(x)-exp(-x))/((x+1)+(x-1)) What are the four computed values of f, if IEEE...
1. (a) We want to develop a method for calculating the function sint dt f)-inf t 0 for small or moderately small values of x. This is a special function called the "sine integral", and it is related to another special function called the "exponential integral". It arises in diffraction problems. Derive a Taylor-series expression for f(x), and give an upper bound for the error when the series is terminated after the n-th order term. [HINT: (-1)"*z ? + R...